Skip to content

Commit

Permalink
Consistently use LF line endings in expected .out and .err output (#1635
Browse files Browse the repository at this point in the history
)

Test scripts compare files as text
  • Loading branch information
Rangi42 authored Jan 29, 2025
1 parent 375adc6 commit a59867c
Show file tree
Hide file tree
Showing 31 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions test/asm/multiple-else.err
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FATAL: multiple-else.asm(11):
Found ELSE after an ELSE block
FATAL: multiple-else.asm(11):
Found ELSE after an ELSE block
4 changes: 2 additions & 2 deletions test/asm/narg-decreases-after-shift.err
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
warning: narg-decreases-after-shift.asm(14) -> narg-decreases-after-shift.asm::testing(9): [-Wmacro-shift]
Cannot shift macro arguments past their end
warning: narg-decreases-after-shift.asm(14) -> narg-decreases-after-shift.asm::testing(9): [-Wmacro-shift]
Cannot shift macro arguments past their end
4 changes: 2 additions & 2 deletions test/asm/strrpl.err
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
warning: strrpl.asm(4): [-Wempty-strrpl]
STRRPL: Cannot replace an empty string
warning: strrpl.asm(4): [-Wempty-strrpl]
STRRPL: Cannot replace an empty string
2 changes: 1 addition & 1 deletion test/asm/symbol-invalid-macro-arg.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$A
$A
2 changes: 1 addition & 1 deletion test/asm/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RGBASM=../../rgbasm
RGBLINK=../../rgblink

tryDiff () {
if ! diff -u --strip-trailing-cr "$1" "$2"; then
if ! diff -au --strip-trailing-cr "$1" "$2"; then
echo "${bold}${red}${i%.asm}${variant}.$3 mismatch!${rescolors}${resbold}"
false
fi
Expand Down
2 changes: 1 addition & 1 deletion test/fix/color.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the CGB flag
warning: Overwrote a non-zero byte in the CGB flag
2 changes: 1 addition & 1 deletion test/fix/compatible.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the CGB flag
warning: Overwrote a non-zero byte in the CGB flag
2 changes: 1 addition & 1 deletion test/fix/custom-logo.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the logo
warning: Overwrote a non-zero byte in the logo
2 changes: 1 addition & 1 deletion test/fix/gameid.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the manufacturer code
warning: Overwrote a non-zero byte in the manufacturer code
4 changes: 2 additions & 2 deletions test/fix/header-edit.err
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
warning: Overwrote a non-zero byte in the CGB flag
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the CGB flag
warning: Overwrote a non-zero byte in the header checksum
2 changes: 1 addition & 1 deletion test/fix/header-trash.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the header checksum
2 changes: 1 addition & 1 deletion test/fix/header.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the header checksum
2 changes: 1 addition & 1 deletion test/fix/jp.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the destination code
warning: Overwrote a non-zero byte in the destination code
2 changes: 1 addition & 1 deletion test/fix/logo-trash.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the Nintendo logo
2 changes: 1 addition & 1 deletion test/fix/logo.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the Nintendo logo
2 changes: 1 addition & 1 deletion test/fix/new-lic.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the new licensee code
warning: Overwrote a non-zero byte in the new licensee code
2 changes: 1 addition & 1 deletion test/fix/old-lic-hex.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the old licensee code
warning: Overwrote a non-zero byte in the old licensee code
2 changes: 1 addition & 1 deletion test/fix/old-lic.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the old licensee code
warning: Overwrote a non-zero byte in the old licensee code
2 changes: 1 addition & 1 deletion test/fix/ram.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the RAM size
warning: Overwrote a non-zero byte in the RAM size
4 changes: 2 additions & 2 deletions test/fix/ramful-mbc.err
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
warning: Overwrote a non-zero byte in the cartridge type
warning: Overwrote a non-zero byte in the RAM size
warning: Overwrote a non-zero byte in the cartridge type
warning: Overwrote a non-zero byte in the RAM size
4 changes: 2 additions & 2 deletions test/fix/ramless-mbc.err
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
warning: Overwrote a non-zero byte in the cartridge type
warning: Overwrote a non-zero byte in the RAM size
warning: Overwrote a non-zero byte in the cartridge type
warning: Overwrote a non-zero byte in the RAM size
2 changes: 1 addition & 1 deletion test/fix/sgb.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the SGB flag
warning: Overwrote a non-zero byte in the SGB flag
2 changes: 1 addition & 1 deletion test/fix/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rescolors="$(tput op)"
RGBFIX=./rgbfix

tryDiff () {
if ! diff -u --strip-trailing-cr "$1" "$2"; then
if ! diff -au --strip-trailing-cr "$1" "$2"; then
echo "${bold}${red}${3:-$1} mismatch!${rescolors}${resbold}"
false
fi
Expand Down
2 changes: 1 addition & 1 deletion test/fix/title-pad.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the title
warning: Overwrote a non-zero byte in the title
2 changes: 1 addition & 1 deletion test/fix/title.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the title
warning: Overwrote a non-zero byte in the title
6 changes: 3 additions & 3 deletions test/fix/verify-pad.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the global checksum
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the global checksum
6 changes: 3 additions & 3 deletions test/fix/verify-trash.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the global checksum
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the global checksum
6 changes: 3 additions & 3 deletions test/fix/verify.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the global checksum
warning: Overwrote a non-zero byte in the Nintendo logo
warning: Overwrote a non-zero byte in the header checksum
warning: Overwrote a non-zero byte in the global checksum
2 changes: 1 addition & 1 deletion test/fix/version.err
Original file line number Diff line number Diff line change
@@ -1 +1 @@
warning: Overwrote a non-zero byte in the mask ROM version number
warning: Overwrote a non-zero byte in the mask ROM version number
4 changes: 2 additions & 2 deletions test/gfx/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ for f in *.png; do
newTest "$RGBGFX" $flags "$f"
if [[ -e "${f%.png}.err" ]]; then
runTest 2>"$errtmp"
diff -u --strip-trailing-cr "${f%.png}.err" "$errtmp" || failTest
diff -au --strip-trailing-cr "${f%.png}.err" "$errtmp" || failTest
else
runTest && checkOutput "${f%.png}" || failTest $?
fi

newTest "$RGBGFX" $flags - "<$f"
if [[ -e "${f%.png}.err" ]]; then
runTest 2>"$errtmp"
diff -u --strip-trailing-cr <(sed "s/$f/<stdin>/g" "${f%.png}.err") "$errtmp" || failTest
diff -au --strip-trailing-cr <(sed "s/$f/<stdin>/g" "${f%.png}.err") "$errtmp" || failTest
else
runTest && checkOutput "${f%.png}" || failTest $?
fi
Expand Down
2 changes: 1 addition & 1 deletion test/link/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ continueTest () {
}

tryDiff () {
if ! diff -u --strip-trailing-cr "$1" "$2"; then
if ! diff -au --strip-trailing-cr "$1" "$2"; then
echo "${bold}${red}$1 mismatch!${rescolors}${resbold}"
false
fi
Expand Down

0 comments on commit a59867c

Please sign in to comment.