diff --git a/.gitattributes b/.gitattributes index d60c52d3a..37a614cc4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,6 +5,10 @@ # Flags also need Unix line endings (see https://github.com/gbdev/rgbds/issues/955) *.flags text eol=lf +# Test outputs need native line endings (see https://github.com/gbdev/rgbds/pull/1635) +*.out text eol=native +*.err text eol=native + # Binary files need exact bytes *.bin binary *.gb binary diff --git a/test/asm/test.sh b/test/asm/test.sh index 17353bf5b..46a8e4a0b 100755 --- a/test/asm/test.sh +++ b/test/asm/test.sh @@ -30,7 +30,7 @@ RGBASM=../../rgbasm RGBLINK=../../rgblink tryDiff () { - if ! diff -au --strip-trailing-cr "$1" "$2"; then + if ! diff -au "$1" "$2"; then echo "${bold}${red}${i%.asm}${variant}.$3 mismatch!${rescolors}${resbold}" false fi diff --git a/test/fix/test.sh b/test/fix/test.sh index 7fd5cbebb..1c13d497e 100755 --- a/test/fix/test.sh +++ b/test/fix/test.sh @@ -25,7 +25,7 @@ rescolors="$(tput op)" RGBFIX=./rgbfix tryDiff () { - if ! diff -au --strip-trailing-cr "$1" "$2"; then + if ! diff -au "$1" "$2"; then echo "${bold}${red}${3:-$1} mismatch!${rescolors}${resbold}" false fi diff --git a/test/gfx/test.sh b/test/gfx/test.sh index 7896b6307..71d65e6c8 100755 --- a/test/gfx/test.sh +++ b/test/gfx/test.sh @@ -83,7 +83,7 @@ for f in *.png; do newTest "$RGBGFX" $flags "$f" if [[ -e "${f%.png}.err" ]]; then runTest 2>"$errtmp" - diff -au --strip-trailing-cr "${f%.png}.err" "$errtmp" || failTest + diff -au "${f%.png}.err" "$errtmp" || failTest else runTest && checkOutput "${f%.png}" || failTest $? fi @@ -91,7 +91,7 @@ for f in *.png; do newTest "$RGBGFX" $flags - "<$f" if [[ -e "${f%.png}.err" ]]; then runTest 2>"$errtmp" - diff -au --strip-trailing-cr <(sed "s/$f//g" "${f%.png}.err") "$errtmp" || failTest + diff -au <(sed "s/$f//g" "${f%.png}.err") "$errtmp" || failTest else runTest && checkOutput "${f%.png}" || failTest $? fi diff --git a/test/link/test.sh b/test/link/test.sh index 44d443585..5a97f13d9 100755 --- a/test/link/test.sh +++ b/test/link/test.sh @@ -38,7 +38,7 @@ continueTest () { } tryDiff () { - if ! diff -au --strip-trailing-cr "$1" "$2"; then + if ! diff -au "$1" "$2"; then echo "${bold}${red}$1 mismatch!${rescolors}${resbold}" false fi