mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Consistently use LF line endings in expected .out and .err output (#1635)
Test scripts compare files as text
This commit is contained in:
@@ -30,7 +30,7 @@ RGBASM=../../rgbasm
|
|||||||
RGBLINK=../../rgblink
|
RGBLINK=../../rgblink
|
||||||
|
|
||||||
tryDiff () {
|
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}"
|
echo "${bold}${red}${i%.asm}${variant}.$3 mismatch!${rescolors}${resbold}"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ rescolors="$(tput op)"
|
|||||||
RGBFIX=./rgbfix
|
RGBFIX=./rgbfix
|
||||||
|
|
||||||
tryDiff () {
|
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}"
|
echo "${bold}${red}${3:-$1} mismatch!${rescolors}${resbold}"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ for f in *.png; do
|
|||||||
newTest "$RGBGFX" $flags "$f"
|
newTest "$RGBGFX" $flags "$f"
|
||||||
if [[ -e "${f%.png}.err" ]]; then
|
if [[ -e "${f%.png}.err" ]]; then
|
||||||
runTest 2>"$errtmp"
|
runTest 2>"$errtmp"
|
||||||
diff -u --strip-trailing-cr "${f%.png}.err" "$errtmp" || failTest
|
diff -au --strip-trailing-cr "${f%.png}.err" "$errtmp" || failTest
|
||||||
else
|
else
|
||||||
runTest && checkOutput "${f%.png}" || failTest $?
|
runTest && checkOutput "${f%.png}" || failTest $?
|
||||||
fi
|
fi
|
||||||
@@ -91,7 +91,7 @@ for f in *.png; do
|
|||||||
newTest "$RGBGFX" $flags - "<$f"
|
newTest "$RGBGFX" $flags - "<$f"
|
||||||
if [[ -e "${f%.png}.err" ]]; then
|
if [[ -e "${f%.png}.err" ]]; then
|
||||||
runTest 2>"$errtmp"
|
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
|
else
|
||||||
runTest && checkOutput "${f%.png}" || failTest $?
|
runTest && checkOutput "${f%.png}" || failTest $?
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ continueTest () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tryDiff () {
|
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}"
|
echo "${bold}${red}$1 mismatch!${rescolors}${resbold}"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user