Debian Codegraph @

test/blackbox-tests/test-cases/pkg/merlin/dev-tool-merlin-env.t

raw
1 Test that after evaling the output of 'dune tools env', the first ocamlmerlin
2 executable in PATH is the one installed by dune as a dev tool.
3
4 $ mkrepo
5 $ make_mock_merlin_package
6 $ mk_ocaml 5.2.0
7
8 $ setup_merlin_workspace
9
10 $ cat > dune-project <<EOF
11 > (lang dune 3.16)
12 >
13 > (package
14 > (name foo)
15 > (allow_empty)
16 > (depends
17 > (ocaml (= 5.2.0))))
18 > EOF
19
20 $ dune build
21
22 First install the tool:
23 $ dune tools exec ocamlmerlin
24 Solution for _build/.dev-tools.locks/merlin:
25 - merlin.0.0.1
26 - ocaml-base-compiler.5.2.0
27 - ocaml-compiler.5.2.0
28 Running 'ocamlmerlin'
29 hello from fake ocamlmerlin
30
31 Now check that 'dune tools env' puts the dev tool in PATH:
32 $ eval $(dune tools env)
33 $ which ocamlmerlin
34 $TESTCASE_ROOT/_build/_private/default/.dev-tool/merlin/target/bin/ocamlmerlin