35 lines
748 B
Perl
35 lines
748 B
Perl
|
|
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" ]
|