Skip to content

Commit 102557a

Browse files
committed
check windows bash newline behavior
1 parent c0c0922 commit 102557a

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

analysis/test.sh

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
function exp {
22
echo "$(dirname $1)/expected/$(basename $1).txt"
33
}
4+
function exp2 {
5+
echo "$(dirname $1)/expected/$(basename $1).2.txt"
6+
}
47

58
echo "cat -A test.sh"
69
cat -A tests/src/expected/Auto.res.txt
@@ -9,16 +12,27 @@ echo "git diff test.sh"
912
git diff tests/src/expected/Auto.res.txt
1013
echo "done---------"
1114

15+
echo "doing an echo test"
16+
1217
# node ./checkErrors.js
1318

1419
for file in tests/src/*.{res,resi}; do
15-
./rescript-editor-analysis.exe test $file &> $(exp $file)
20+
# ./rescript-editor-analysis.exe test $file &> $(exp $file)
21+
cat $(exp $file) &> $(exp2 $file)
1622
# CI
1723
# if [ "$RUNNER_OS" == "Windows" ]; then
1824
# dos2unix $(exp $file)
1925
# fi
2026
done
2127

28+
echo "cat -A test.sh last"
29+
cat -A tests/src/expected/Auto.res.2.txt
30+
echo "done cat last---------"
31+
echo "git diff test.sh last"
32+
diff -u tests/src/expected/Auto.res.txt tests/src/expected/Auto.res.2.txt
33+
echo "done git last---------"
34+
35+
2236
warningYellow='\033[0;33m'
2337
successGreen='\033[0;32m'
2438
reset='\033[0m'
@@ -30,13 +44,6 @@ else
3044
printf "${warningYellow}⚠️ There are unstaged differences in tests/! Did you break a test?\n${diff}\n${reset}"
3145
# node ./checkErrors.js
3246

33-
echo "cat -A test.sh last"
34-
cat -A tests/src/expected/Auto.res.txt
35-
echo "done cat last---------"
36-
echo "git diff test.sh last"
37-
git diff tests/src/expected/Auto.res.txt
38-
echo "done git last---------"
39-
4047
git --no-pager diff --word-diff-regex=. tests/src/expected/Auto.res.txt
4148
exit 1
4249
fi

0 commit comments

Comments
 (0)