This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
We test how opam files with substs fields are translated into the dune.lock file.
|
||||
|
||||
$ . ./helpers.sh
|
||||
$ mkrepo
|
||||
|
||||
Make a package with a substs field
|
||||
$ mkpkg with-substs <<EOF
|
||||
> substs: ["foo.ml"]
|
||||
> build: [ "sh" "-c" "[ -e foo.ml ] && cat foo.ml" ]
|
||||
> EOF
|
||||
|
||||
$ solve with-substs
|
||||
Solution for dune.lock:
|
||||
- with-substs.0.0.1
|
||||
$ cat >>dune.lock/with-substs.pkg <<EOF
|
||||
> (source (copy $PWD/source))
|
||||
> EOF
|
||||
|
||||
The lockfile should contain the substitute action.
|
||||
$ cat dune.lock/with-substs.pkg
|
||||
(version 0.0.1)
|
||||
|
||||
(build
|
||||
(progn
|
||||
(substitute foo.ml.in foo.ml)
|
||||
(run sh -c "[ -e foo.ml ] && cat foo.ml")))
|
||||
(source (copy $TESTCASE_ROOT/source))
|
||||
|
||||
$ mkdir source
|
||||
$ cat > source/foo.ml.in <<EOF
|
||||
> I have been substituted.
|
||||
> EOF
|
||||
|
||||
The file foo.ml should have been built:
|
||||
|
||||
$ build_pkg with-substs
|
||||
I have been substituted.
|
||||
Loading…
Add table
Add a link
Reference in a new issue