Skip to content

Commit 92e054f

Browse files
committed
tests/syntax_tests/* -> tests/syntax_tests/data/*
1 parent c18fdff commit 92e054f

File tree

1,772 files changed

+209
-211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,772 files changed

+209
-211
lines changed

compiler/syntax/testrunner/res_test.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module IO = Res_io
22

3-
let data_dir = "tests/syntax_tests"
3+
let data_dir = "tests/syntax_tests/data"
44

55
(* test printing of .res file*)
66
let () =

scripts/test_syntax.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ scriptDir=`dirname $0`
1010
# so let's use this workaround instead.
1111
DUNE_BIN_DIR=`cd "$scriptDir/../_build/install/default/bin"; pwd -P`
1212

13-
$DUNE_BIN_DIR/syntax_tests
14-
1513
function exp {
1614
echo "$(dirname $1)/expected/$(basename $1).txt"
1715
}
@@ -29,23 +27,23 @@ rm -rf temp
2927
mkdir 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
3331
while read file; do
3432
$DUNE_BIN_DIR/res_parser -recover -print ml $file &> $(exp $file) & maybeWait
3533
done <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
3735
while read file; do
3836
$DUNE_BIN_DIR/res_parser -print ml $file &> $(exp $file) & maybeWait
3937
done <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
4341
while read file; do
4442
$DUNE_BIN_DIR/res_parser $file &> $(exp $file) & maybeWait
4543
done <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
4947
while read file; do
5048
$DUNE_BIN_DIR/res_parser -jsx-version 4 -jsx-mode "automatic" $file &> $(exp $file) & maybeWait
5149
done <temp/files.txt
@@ -61,7 +59,7 @@ diff=$(cat temp/diff.txt)
6159
if [[ $diff = "" ]]; then
6260
printf "${successGreen}✅ No unstaged tests difference.${reset}\n"
6361
else
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
6765
fi
@@ -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

Comments
 (0)