This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
This test demonstrates the handling of invalid dune-package files
|
||||
$ mkdir -p findlib/baz
|
||||
$ touch findlib/baz/dune-package
|
||||
$ echo "(lang dune 2.0)" > dune-project
|
||||
$ echo 'let () = print_endline "foo"' > foo.ml
|
||||
$ cat >dune <<EOF
|
||||
> (executable (name foo))
|
||||
> (library (name bar) (libraries baz) (modules))
|
||||
> EOF
|
||||
$ OCAMLPATH=$PWD/findlib dune exec ./foo.exe
|
||||
foo
|
||||
|
||||
Now we attempt to use an invalid dune-package library:
|
||||
$ cat >dune <<EOF
|
||||
> (executable (name foo) (libraries baz))
|
||||
> EOF
|
||||
$ OCAMLPATH=$PWD/findlib dune exec ./foo.exe
|
||||
File "$TESTCASE_ROOT/findlib/baz/dune-package", line 1, characters 0-0:
|
||||
Error: Invalid first line, expected: (lang <lang> <version>)
|
||||
-> required by _build/default/.foo.eobjs/native/dune__exe__Foo.cmx
|
||||
-> required by _build/default/foo.exe
|
||||
[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue