diff --git a/analysis/test.sh b/analysis/test.sh index f21f7cdae..e12a2e50e 100755 --- a/analysis/test.sh +++ b/analysis/test.sh @@ -1,9 +1,12 @@ -function exp { - echo "$(dirname $1)/expected/$(basename $1).txt" -} - for file in tests/src/*.{res,resi}; do - ./rescript-editor-analysis.exe test $file &> $(exp $file) + output="$(dirname $file)/expected/$(basename $file).txt" + ./rescript-editor-analysis.exe test $file &> $output + # CI + echo $RUNNER_OS + if [ "$RUNNER_OS" == "Windows" ]; then + echo "sedding..." + sed -i "s/\r\n/\n/g" $output + fi done ./testmore.exe > helloworld.txt @@ -26,21 +29,17 @@ echo "------" echo "cat helloworld3.txt" cat -A helloworld3.txt echo "------" -echo "dox2unix helloworld.txt" -dos2unix helloworld.txt -echo "------" -echo "dox2unix helloworld2.txt" -dos2unix helloworld2.txt -echo "------" -echo "dox2unix helloworld3.txt" -dos2unix helloworld3.txt -echo "------" -echo "========all done!=========" -# # CI -# if [ "$RUNNER_OS" == "Windows" ]; then -# dos2unix tests/src/expected/* -# fi +# echo "dox2unix helloworld.txt" +# dos2unix helloworld.txt +# echo "------" +# echo "dox2unix helloworld2.txt" +# dos2unix helloworld2.txt +# echo "------" +# echo "dox2unix helloworld3.txt" +# dos2unix helloworld3.txt +# echo "------" +# echo "========all done!=========" warningYellow='\033[0;33m' successGreen='\033[0;32m'