Skip to content

Commit 699b72d

Browse files
committed
dos2unix in test script
1 parent 102557a commit 699b72d

File tree

2 files changed

+7
-29
lines changed

2 files changed

+7
-29
lines changed

analysis/Makefile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,13 @@ $(OUTPUT): $(SOURCE_FILES)
3030
build-native: $(OUTPUT) depend
3131

3232
dce: build-native
33-
@echo "git diff makefile dce 1"
34-
git diff tests/src/expected/Auto.res.txt
3533
../node_modules/.bin/reanalyze -dce-cmt src -suppress src/vendor
36-
@echo "git diff makefile dce 2"
37-
git diff tests/src/expected/Auto.res.txt
3834

3935
tests/node_modules/.bin/rescript:
40-
@echo "git diff makefile rescript 1"
41-
git diff tests/src/expected/Auto.res.txt
4236
@cd tests && npm install
43-
@echo "git diff makefile rescript 2"
44-
git diff tests/src/expected/Auto.res.txt
4537

4638
test: dce tests/node_modules/.bin/rescript
47-
@echo "git diff makefile test 1"
48-
git diff tests/src/expected/Auto.res.txt
4939
@cd tests && node_modules/.bin/rescript
50-
@echo "git diff makefile test 2"
51-
git diff tests/src/expected/Auto.res.txt
5240
./test.sh
5341

5442
clean:

analysis/test.sh

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
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-
}
74

85
echo "cat -A test.sh"
96
cat -A tests/src/expected/Auto.res.txt
@@ -12,27 +9,22 @@ echo "git diff test.sh"
129
git diff tests/src/expected/Auto.res.txt
1310
echo "done---------"
1411

15-
echo "doing an echo test"
16-
17-
# node ./checkErrors.js
18-
1912
for file in tests/src/*.{res,resi}; do
20-
# ./rescript-editor-analysis.exe test $file &> $(exp $file)
21-
cat $(exp $file) &> $(exp2 $file)
22-
# CI
23-
# if [ "$RUNNER_OS" == "Windows" ]; then
24-
# dos2unix $(exp $file)
25-
# fi
13+
./rescript-editor-analysis.exe test $file &> $(exp $file)
2614
done
2715

16+
# CI
17+
if [ "$RUNNER_OS" == "Windows" ]; then
18+
dos2unix tests/src/expected/*
19+
fi
20+
2821
echo "cat -A test.sh last"
29-
cat -A tests/src/expected/Auto.res.2.txt
22+
cat -A tests/src/expected/Auto.res.txt
3023
echo "done cat last---------"
3124
echo "git diff test.sh last"
3225
diff -u tests/src/expected/Auto.res.txt tests/src/expected/Auto.res.2.txt
3326
echo "done git last---------"
3427

35-
3628
warningYellow='\033[0;33m'
3729
successGreen='\033[0;32m'
3830
reset='\033[0m'
@@ -42,8 +34,6 @@ if [[ $diff = "" ]]; then
4234
printf "${successGreen}✅ No unstaged tests difference.${reset}\n"
4335
else
4436
printf "${warningYellow}⚠️ There are unstaged differences in tests/! Did you break a test?\n${diff}\n${reset}"
45-
# node ./checkErrors.js
46-
4737
git --no-pager diff --word-diff-regex=. tests/src/expected/Auto.res.txt
4838
exit 1
4939
fi

0 commit comments

Comments
 (0)