Skip to content

Commit

Permalink
Rename iniline-tests -> inline_tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Lasson <[email protected]>
  • Loading branch information
mlasson committed Jul 22, 2019
1 parent 878b003 commit fc2b677
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Do not put the `<package>.install` files in the source tree unless `-p` or
`--promote-install-files` is passed on the command line (#2329, @diml)

- Add a new `inline-tests` field in the env stanza to control inline-tests
- Add a new `inline_tests` field in the env stanza to control inline_tests
framework with a variable (#2313, @mlasson review and original idea by @diml)

- Change `implicit_transive_deps` to be false. Implicit transitive deps now must
Expand Down
4 changes: 2 additions & 2 deletions doc/dune-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,8 @@ Fields supported in ``<settings>`` are:
be inferred from the basename of ``<filepath>`` by dropping the ``.exe``
suffix if it exists.

- ``(inline-tests <state>)`` where state is either ``enabled``, ``disabled`` or
``ignored``. This field controls the value of the variable ``%{inline-tests}``
- ``(inline_tests <state>)`` where state is either ``enabled``, ``disabled`` or
``ignored``. This field controls the value of the variable ``%{inline_tests}``
that is read by the inline test framework. The default value is ``disabled``
for the ``release`` profile and ``enabled`` otherwise.

Expand Down
2 changes: 1 addition & 1 deletion src/dune_env.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module Stanza = struct

let inline_tests_field =
field_o
"inline-tests"
"inline_tests"
(Syntax.since Stanza.syntax (1, 11) >>>
Inline_tests.decode)

Expand Down
2 changes: 1 addition & 1 deletion src/super_context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ end = struct
inline_tests t ~dir
|> Dune_env.Stanza.Inline_tests.to_string
in
Pform.Map.singleton "inline-tests" (Values [String str])
Pform.Map.singleton "inline_tests" (Values [String str])
in
expander
|> Expander.add_bindings ~bindings
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/inline_tests/simple/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name backend_simple)
(modules ())
(inline_tests.backend
(generate_runner (run sed "s/(\\*TEST:\\(.*\\)\\*)/let () = if \"%{inline-tests}\" = \"enabled\" then \\1;;/" %{impl-files})
(generate_runner (run sed "s/(\\*TEST:\\(.*\\)\\*)/let () = if \"%{inline_tests}\" = \"enabled\" then \\1;;/" %{impl-files})
)))

(library
Expand Down

0 comments on commit fc2b677

Please sign in to comment.