Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ulysse Gérard <[email protected]>
  • Loading branch information
voodoos committed Sep 24, 2020
1 parent bc90636 commit 93b07d7
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 42 deletions.
31 changes: 19 additions & 12 deletions test/blackbox-tests/test-cases/github1946.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@ This test demonstrates that -ppx is no more missing when two stanzas are
in the same dune file, but require different ppx specifications

$ dune build @all --profile release
$ cat _build/default/.merlin-conf |
> sed 's/[0-9]*:/?:/g' | sed 's/)(/)|(/g' | tr '|' '\n'
$ dune ocaml-merlin --dump-config=$(pwd)
usesppx1
((?:EXCLUDE_QUERY_DIR)
(?:B?:$TESTCASE_ROOT/_build/default/.usesppx1.objs/byte)
(?:S?:$TESTCASE_ROOT)
(?:FLG(?:-ppx?:$TESTCASE_ROOT/_build/default/.ppx/c152d6ca3c7e1d83471ffdf48bf729ae/ppx.exe --as-ppx --cookie 'library-name="usesppx1"'))
(?:FLG(?:-open?:Usesppx?:-w?:-40)))
((EXCLUDE_QUERY_DIR)
(B
$TESTCASE_ROOT/_build/default/.usesppx1.objs/byte)
(S
$TESTCASE_ROOT)
(FLG
(-ppx
"$TESTCASE_ROOT/_build/default/.ppx/c152d6ca3c7e1d83471ffdf48bf729ae/ppx.exe --as-ppx --cookie 'library-name="usesppx1"'"))
(FLG (-open Usesppx1 -w -40)))
usesppx2
((?:EXCLUDE_QUERY_DIR)
(?:B?:$TESTCASE_ROOT/_build/default/.usesppx2.objs/byte)
(?:S?:$TESTCASE_ROOT)
(?:FLG(?:-ppx?:$TESTCASE_ROOT/_build/default/.ppx/d7394c27c5e0f7ad7ab1110d6b092c05/ppx.exe --as-ppx --cookie 'library-name="usesppx2"'))
(?:FLG(?:-open?:Usesppx?:-w?:-40)))
((EXCLUDE_QUERY_DIR)
(B
$TESTCASE_ROOT/_build/default/.usesppx2.objs/byte)
(S
$TESTCASE_ROOT)
(FLG
(-ppx
"$TESTCASE_ROOT/_build/default/.ppx/d7394c27c5e0f7ad7ab1110d6b092c05/ppx.exe --as-ppx --cookie 'library-name="usesppx2"'"))
(FLG (-open Usesppx2 -w -40)))
8 changes: 5 additions & 3 deletions test/blackbox-tests/test-cases/github2206.t/run.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
copy_files would break the generation of the preprocessing flags
$ dune build copy_files/.merlin-conf
$ cat _build/default/copy_files/.merlin-conf |
> sed 's/[0-9]*:/?:/g' | sed 's/)/)|/g' | tr '|' '\n' | grep -E "pp"
(?:FLG(?:-pp?:$TESTCASE_ROOT/_build/default/pp.exe)
$ dune ocaml-merlin --dump-config=$(pwd)/copy_files |
> grep -B 1 -A 0 "pp"
(FLG
(-pp
$TESTCASE_ROOT/_build/default/pp.exe))
39 changes: 21 additions & 18 deletions test/blackbox-tests/test-cases/github759.t/run.t
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
$ dune build foo.cma --profile release
$ cat _build/default/.merlin-conf |
> sed 's/[0-9]*:/?:/g' | sed 's/)(/)|(/g' | tr '|' '\n'
$ dune ocaml-merlin --dump-config=$(pwd)
foo
((?:EXCLUDE_QUERY_DIR)
(?:B?:$TESTCASE_ROOT/_build/default/.foo.objs/byte)
(?:S?:$TESTCASE_ROOT)
(?:FLG(?:-open?:Foo?:-w?:-40)))
((EXCLUDE_QUERY_DIR)
(B
$TESTCASE_ROOT/_build/default/.foo.objs/byte)
(S
$TESTCASE_ROOT)
(FLG (-open Foo -w -40)))

$ rm -f .merlin
$ dune build foo.cma --profile release
$ cat _build/default/.merlin-conf |
> sed 's/[0-9]*:/?:/g' | sed 's/)(/)|(/g' | tr '|' '\n'
$ dune ocaml-merlin --dump-config=$(pwd)
foo
((?:EXCLUDE_QUERY_DIR)
(?:B?:$TESTCASE_ROOT/_build/default/.foo.objs/byte)
(?:S?:$TESTCASE_ROOT)
(?:FLG(?:-open?:Foo?:-w?:-40)))
((EXCLUDE_QUERY_DIR)
(B
$TESTCASE_ROOT/_build/default/.foo.objs/byte)
(S
$TESTCASE_ROOT)
(FLG (-open Foo -w -40)))

$ echo toto > .merlin
$ dune build foo.cma --profile release
$ cat _build/default/.merlin-conf |
> sed 's/[0-9]*:/?:/g' | sed 's/)(/)|(/g' | tr '|' '\n'
$ dune ocaml-merlin --dump-config=$(pwd)
foo
((?:EXCLUDE_QUERY_DIR)
(?:B?:$TESTCASE_ROOT/_build/default/.foo.objs/byte)
(?:S?:$TESTCASE_ROOT)
(?:FLG(?:-open?:Foo?:-w?:-40)))
((EXCLUDE_QUERY_DIR)
(B
$TESTCASE_ROOT/_build/default/.foo.objs/byte)
(S
$TESTCASE_ROOT)
(FLG (-open Foo -w -40)))
31 changes: 22 additions & 9 deletions test/blackbox-tests/test-cases/merlin/src-dirs-of-deps.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,27 @@ library also has more than one src dir.
$ cat >lib2/dune <<EOF
> (library (name lib2) (libraries lib1) (modules ()))
> EOF

$ dune build lib2/.merlin-conf
$ cat _build/default/lib2/.merlin-conf |
> sed 's/[0-9]*:/?:/g' | sed 's/)(/)|(/g' | tr '|' '\n'
$ dune ocaml-merlin --dump-config=$(pwd)/lib2
lib2
((?:EXCLUDE_QUERY_DIR)
(?:B?:$TESTCASE_ROOT/_build/default/lib1/.lib1.objs/byte)
(?:B?:$TESTCASE_ROOT/_build/default/lib2/.lib2.objs/byte)
(?:S?:$TESTCASE_ROOT/lib1)
(?:S?:$TESTCASE_ROOT/lib1/sub)
(?:S?:$TESTCASE_ROOT/lib2)
(?:FLG(?:-open?:Lib?:-w?:@1..3@5..28@30..39@43@46..47@49..57@61..62-?:-strict-sequence?:-strict-formats?:-short-paths?:-keep-locs)))
((EXCLUDE_QUERY_DIR)
(B
$TESTCASE_ROOT/_build/default/lib1/.lib1.objs/byte)
(B
$TESTCASE_ROOT/_build/default/lib2/.lib2.objs/byte)
(S
$TESTCASE_ROOT/lib1)
(S
$TESTCASE_ROOT/lib1/sub)
(S
$TESTCASE_ROOT/lib2)
(FLG
(-open
Lib2
-w
@1..3@5..28@30..39@43@46..47@49..57@61..62-40
-strict-sequence
-strict-formats
-short-paths
-keep-locs)))

0 comments on commit 93b07d7

Please sign in to comment.