Test binary output for rgbasm tests

This commit is contained in:
yenatch
2018-06-30 23:26:48 -04:00
parent 64158cf513
commit 587159448a
2 changed files with 16 additions and 3 deletions

View File

@@ -1,11 +1,23 @@
#!/bin/sh #!/bin/sh
fname=$(mktemp) o=$(mktemp)
gb=$(mktemp)
before=$(mktemp)
after=$(mktemp)
rc=0 rc=0
for i in *.asm; do for i in *.asm; do
../../rgbasm $i >$fname 2>&1 ../../rgbasm -o $o $i > $after 2>&1
diff -u $fname ${i%.asm}.out diff -u ${i%.asm}.out $after
rc=$(($? || $rc)) rc=$(($? || $rc))
bin=${i%.asm}.out.bin
if [ -f $bin ]; then
../../rgblink -o $gb $o > $after 2>&1
head -c $(wc -c < $bin) $gb > $after 2>&1
hexdump -C $after > $before && mv $before $after
hexdump -C $bin > $before
diff -u $before $after
rc=$(($? || $rc))
fi
done done
exit $rc exit $rc

1
test/asm/utf-8.out.bin Normal file
View File

@@ -0,0 +1 @@
é