#!/bin/sh

program=${1:-test_parse}

cd ../obj
./$program > t

id=$$
sed -e 's/0x[0-9a-f]*/0xffff/g' t > /tmp/t.id
sed -e 's/0x[0-9a-f]*/0xffff/g' ../tests/${program}.out > /tmp/t2.id

echo "Diff for $program"
diff /tmp/t2.id /tmp/t.id

rm /tmp/t.id /tmp/t2.id
