@@ -10,8 +10,6 @@ scriptDir=`dirname $0`
1010# so let's use this workaround instead.
1111DUNE_BIN_DIR=` cd " $scriptDir /../_build/install/default/bin" ; pwd -P`
1212
13- $DUNE_BIN_DIR /syntax_tests
14-
1513function exp {
1614 echo " $( dirname $1 ) /expected/$( basename $1 ) .txt"
1715}
@@ -29,23 +27,23 @@ rm -rf temp
2927mkdir temp
3028
3129# parsing
32- find syntax_tests/parsing/{errors,infiniteLoops,recovery} -name " *.res" -o -name " *.resi" > temp/files.txt
30+ find syntax_tests/data/ parsing/{errors,infiniteLoops,recovery} -name " *.res" -o -name " *.resi" > temp/files.txt
3331while read file; do
3432 $DUNE_BIN_DIR /res_parser -recover -print ml $file & > $( exp $file ) & maybeWait
3533done < temp/files.txt
36- find syntax_tests/parsing/{grammar,other} -name " *.res" -o -name " *.resi" > temp/files.txt
34+ find syntax_tests/data/ parsing/{grammar,other} -name " *.res" -o -name " *.resi" > temp/files.txt
3735while read file; do
3836 $DUNE_BIN_DIR /res_parser -print ml $file & > $( exp $file ) & maybeWait
3937done < temp/files.txt
4038
4139# printing
42- find syntax_tests/{printer,conversion} -name " *.res" -o -name " *.resi" -o -name " *.ml" -o -name " *.mli" > temp/files.txt
40+ find syntax_tests/data/ {printer,conversion} -name " *.res" -o -name " *.resi" -o -name " *.ml" -o -name " *.mli" > temp/files.txt
4341while read file; do
4442 $DUNE_BIN_DIR /res_parser $file & > $( exp $file ) & maybeWait
4543done < temp/files.txt
4644
4745# printing with ppx
48- find syntax_tests/ppx/react -name " *.res" -o -name " *.resi" > temp/files.txt
46+ find syntax_tests/data/ ppx/react -name " *.res" -o -name " *.resi" > temp/files.txt
4947while read file; do
5048 $DUNE_BIN_DIR /res_parser -jsx-version 4 -jsx-mode " automatic" $file & > $( exp $file ) & maybeWait
5149done < temp/files.txt
@@ -61,7 +59,7 @@ diff=$(cat temp/diff.txt)
6159if [[ $diff = " " ]]; then
6260 printf " ${successGreen} ✅ No unstaged tests difference.${reset} \n"
6361else
64- printf " ${warningYellow} ⚠️ There are unstaged differences in syntax_tests/! Did you break a test?\n${diff} \n${reset} "
62+ printf " ${warningYellow} ⚠️ There are unstaged differences in syntax_tests/data/ ! Did you break a test?\n${diff} \n${reset} "
6563 rm -r temp/
6664 exit 1
6765fi
@@ -72,7 +70,7 @@ if [[ $ROUNDTRIP_TEST = 1 ]]; then
7270 roundtripTestsResult=" temp/result.txt"
7371 touch $roundtripTestsResult
7472
75- find syntax_tests/{idempotency,printer} -name " *.res" -o -name " *.resi" > temp/files.txt
73+ find syntax_tests/data/ {idempotency,printer} -name " *.res" -o -name " *.resi" > temp/files.txt
7674 while read file; do {
7775 mkdir -p temp/$( dirname $file )
7876 sexpAst1=temp/$file .sexp
0 commit comments