diff --git a/test/asm/test.sh b/test/asm/test.sh index e22bc1b1..36f5b05a 100755 --- a/test/asm/test.sh +++ b/test/asm/test.sh @@ -37,9 +37,9 @@ for i in *.asm; do sed "s/$subst/-/g" ${i%.asm}.err > $desired_errput fi - diff -u $desired_output $output + diff -u --strip-trailing-cr $desired_output $output rc=$(($? || $rc)) - diff -u $desired_errput $errput + diff -u --strip-trailing-cr $desired_errput $errput rc=$(($? || $rc)) bin=${i%.asm}.out.bin @@ -48,7 +48,7 @@ for i in *.asm; do dd if=$gb count=1 bs=$(printf %s $(wc -c < $bin)) > $output 2>/dev/null hexdump -C $output > $input && mv $input $output hexdump -C $bin > $input - diff -u $input $output + diff -u --strip-trailing-cr $input $output rc=$(($? || $rc)) fi done diff --git a/test/link/test.sh b/test/link/test.sh index f46652ea..26e8d8a2 100755 --- a/test/link/test.sh +++ b/test/link/test.sh @@ -12,62 +12,62 @@ RGBLINK=../../rgblink $RGBASM -o $otemp bank-numbers.asm $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 -diff bank-numbers.out $outtemp +diff --strip-trailing-cr bank-numbers.out $outtemp rc=$(($? || $rc)) dd if=$gbtemp count=1 bs=20 > $otemp 2>/dev/null -diff bank-numbers.out.bin $otemp +diff --strip-trailing-cr bank-numbers.out.bin $otemp rc=$(($? || $rc)) $RGBASM -o $otemp section-attributes.asm $RGBLINK -l section-attributes.link -o $gbtemp $otemp > $outtemp 2>&1 -diff section-attributes.out $outtemp +diff --strip-trailing-cr section-attributes.out $outtemp rc=$(($? || $rc)) $RGBLINK -l section-attributes-mismatch.link -o $gbtemp $otemp > $outtemp 2>&1 -diff section-attributes-mismatch.out $outtemp +diff --strip-trailing-cr section-attributes-mismatch.out $outtemp rc=$(($? || $rc)) $RGBASM -o $otemp wramx-dmg-mode.asm $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 -diff wramx-dmg-mode-no-d.out $outtemp +diff --strip-trailing-cr wramx-dmg-mode-no-d.out $outtemp rc=$(($? || $rc)) $RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1 -diff wramx-dmg-mode-d.out $outtemp +diff --strip-trailing-cr wramx-dmg-mode-d.out $outtemp rc=$(($? || $rc)) $RGBASM -o $otemp vram-fixed-dmg-mode.asm $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 -diff vram-fixed-dmg-mode-no-d.out $outtemp +diff --strip-trailing-cr vram-fixed-dmg-mode-no-d.out $outtemp rc=$(($? || $rc)) $RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1 -diff vram-fixed-dmg-mode-d.out $outtemp +diff --strip-trailing-cr vram-fixed-dmg-mode-d.out $outtemp rc=$(($? || $rc)) $RGBASM -o $otemp vram-floating-dmg-mode.asm $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 -diff vram-floating-dmg-mode-no-d.out $outtemp +diff --strip-trailing-cr vram-floating-dmg-mode-no-d.out $outtemp rc=$(($? || $rc)) $RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1 -diff vram-floating-dmg-mode-d.out $outtemp +diff --strip-trailing-cr vram-floating-dmg-mode-d.out $outtemp rc=$(($? || $rc)) $RGBASM -o $otemp romx-tiny.asm $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 -diff romx-tiny-no-t.out $outtemp +diff --strip-trailing-cr romx-tiny-no-t.out $outtemp rc=$(($? || $rc)) $RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1 -diff romx-tiny-t.out $outtemp +diff --strip-trailing-cr romx-tiny-t.out $outtemp rc=$(($? || $rc)) $RGBASM -o $otemp high-low-a.asm $RGBLINK -o $gbtemp $otemp $RGBASM -o $otemp high-low-b.asm $RGBLINK -o $gbtemp2 $otemp -diff $gbtemp $gbtemp2 +diff --strip-trailing-cr $gbtemp $gbtemp2 rc=$(($? || $rc)) $RGBASM -o $otemp all-instructions.asm $RGBLINK -o $gbtemp $otemp -diff all-instructions.out.bin $gbtemp +diff --strip-trailing-cr all-instructions.out.bin $gbtemp rc=$(($? || $rc)) rm -f $otemp $gbtemp $gbtemp2 $outtemp