ref: 8a90d743401999d170ae5e1048bdb54c2d86f9c0
parent: 5a06fad31e3e66da33ea0376d47adb4598857654
author: ISSOtm <[email protected]>
date: Tue Oct 29 20:14:56 EDT 2019
Ignore line endings in test suite This removes many false positives with Windows
--- a/test/asm/test.sh
+++ b/test/asm/test.sh
@@ -37,9 +37,9 @@
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 @@
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
--- a/test/link/test.sh
+++ b/test/link/test.sh
@@ -12,50 +12,50 @@
$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
@@ -62,12 +62,12 @@
$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