mte/unikernel/duniverse/dune_/test/blackbox-tests/test-cases/dune-project-meta/template.t

35 lines
748 B
Perl
Raw Normal View History

2025-11-11 02:07:51 +01:00
Templates
---------
$ cat > dune-project <<EOF
> (lang dune 2.0)
> (name foo)
> (generate_opam_files true)
> (package (name foo) (depends bar))
> EOF
Test various fields in the template file. Fields coming from the
template are always put at the end. Fields generated by Dune are
sorted in a way that pleases "opam lint".
$ cat > foo.opam.template <<EOF
> x-foo: "blah"
> EOF
$ dune build @install
$ tail -n 1 foo.opam
x-foo: "blah"
$ cat > foo.opam.template <<EOF
> libraries: [ "blah" ]
> EOF
$ dune build @install
$ tail -n 1 foo.opam
libraries: [ "blah" ]
$ cat > foo.opam.template <<EOF
> depends: [ "overridden" ]
> EOF
$ dune build @install
$ tail -n 1 foo.opam
depends: [ "overridden" ]