mte/unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-affects-expander-affects-env.t

28 lines
696 B
Perl
Raw Normal View History

2025-11-11 02:07:51 +01:00
Current directory (and also current env) can affect an expander,
and expander is in turn used to expand things in env.
Given that we only have a few string_with_vars in env, a reasonable
example is hard to come up with, but here is a contrived one.
$ echo '(lang dune 2.0)' > dune-project
$ cat > dune <<EOF
> (env
> (_
> (ocamlc_flags "%{inline_tests}")))
> EOF
$ dune printenv --root . . --field ocamlc_flags
(ocamlc_flags (enabled))
$ echo '(lang dune 2.0)' > dune-project
$ cat > dune <<EOF
> (env
> (_
> (ocamlc_flags "%{inline_tests}")
> (inline_tests ignored)))
> EOF
$ dune printenv --root . . --field ocamlc_flags
(ocamlc_flags (ignored))