Skip to content

Commit

Permalink
Sed away
Browse files Browse the repository at this point in the history
  • Loading branch information
chenglou committed Apr 29, 2021
1 parent 1a10561 commit 100a7ef
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions analysis/test.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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'
Expand Down

0 comments on commit 100a7ef

Please sign in to comment.