Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <[email protected]>
  • Loading branch information
nojb committed Feb 16, 2021
1 parent 8624a8c commit 81df8d0
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/merlin/merlin-stdlib.t/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(executable (name x))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 2.8)
130 changes: 130 additions & 0 deletions test/blackbox-tests/test-cases/merlin/merlin-stdlib.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
$ dune build @check

Check that STDLIB directive is correctly parsed by merlin
$ ocamlmerlin single dump-configuration -filename x.ml < x.ml |
> jq .
{
"class": "return",
"value": {
"ocaml": {
"include_dirs": [],
"no_std_include": false,
"unsafe": false,
"classic": false,
"principal": false,
"real_paths": true,
"recursive_types": false,
"strict_sequence": false,
"applicative_functors": true,
"unsafe_string": false,
"nopervasives": false,
"strict_formats": false,
"open_modules": [],
"ppx": [],
"pp": null,
"warnings": {
"actives": [
1,
2,
3,
5,
8,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
28,
31,
43,
46,
47,
49,
51,
52,
53,
54,
55,
56,
57,
58,
59,
61,
62,
63,
64,
65
],
"warn_error": [
31
]
}
},
"merlin": {
"build_path": [],
"source_path": [],
"cmi_path": [],
"cmt_path": [],
"flags_applied": [],
"extensions": [],
"suffixes": [
{
"impl": ".ml",
"intf": ".mli"
},
{
"impl": ".re",
"intf": ".rei"
}
],
"stdlib": null,
"reader": [],
"protocol": "json",
"log_file": null,
"log_sections": [],
"flags_to_apply": [],
"failures": [
"No config found for file \"x.ml\". Try calling `dune build`."
],
"assoc_suffixes": [
{
"extension": ".re",
"reader": "reason"
},
{
"extension": ".rei",
"reader": "reason"
}
]
},
"query": {
"filename": "x.ml",
"directory": "$TESTCASE_ROOT",
"printer_width": 0,
"verbosity": 0
}
},
"notifications": [],
"timing": {
"clock": 5,
"cpu": 1,
"query": 1,
"pp": 0,
"reader": 1,
"ppx": 0,
"typer": 0,
"error": 0
}
}
Empty file.

0 comments on commit 81df8d0

Please sign in to comment.