Skip to content

Commit

Permalink
check windows bash newline behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
chenglou committed Apr 29, 2021
1 parent c0c0922 commit 97125ca
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions analysis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@ echo "done---------"
# node ./checkErrors.js

for file in tests/src/*.{res,resi}; do
./rescript-editor-analysis.exe test $file &> $(exp $file)
# ./rescript-editor-analysis.exe test $file &> $(exp $file)
cat $(exp $file) &> $(exp $file)
# CI
# if [ "$RUNNER_OS" == "Windows" ]; then
# dos2unix $(exp $file)
# fi
done

echo "cat -A test.sh last"
cat -A tests/src/expected/Auto.res.txt
echo "done cat last---------"
echo "git diff test.sh last"
git diff tests/src/expected/Auto.res.txt
echo "done git last---------"


warningYellow='\033[0;33m'
successGreen='\033[0;32m'
reset='\033[0m'
Expand All @@ -30,13 +39,6 @@ else
printf "${warningYellow}⚠️ There are unstaged differences in tests/! Did you break a test?\n${diff}\n${reset}"
# node ./checkErrors.js

echo "cat -A test.sh last"
cat -A tests/src/expected/Auto.res.txt
echo "done cat last---------"
echo "git diff test.sh last"
git diff tests/src/expected/Auto.res.txt
echo "done git last---------"

git --no-pager diff --word-diff-regex=. tests/src/expected/Auto.res.txt
exit 1
fi

0 comments on commit 97125ca

Please sign in to comment.