Add tests
The symptoms are a bit different depending on the presence of an interface file.
This commit is contained in:
parent
5d9a99d28b
commit
0cf8a8240a
|
@ -489,3 +489,13 @@
|
|||
(progn
|
||||
(run ${exe:cram.exe} run.t)
|
||||
(diff? run.t run.t.corrected))))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((package jbuilder)
|
||||
(files_recursively_in test-cases/github660)))
|
||||
(action
|
||||
(chdir test-cases/github660
|
||||
(progn
|
||||
(run ${exe:cram.exe} run.t)
|
||||
(diff? run.t run.t.corrected))))))
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps (main.exe))
|
||||
(action (run ${<}))))
|
||||
|
||||
(executable ((name main)))
|
|
@ -0,0 +1 @@
|
|||
module Sub = Lib_sub
|
|
@ -0,0 +1 @@
|
|||
module Sub = Lib_sub
|
|
@ -0,0 +1 @@
|
|||
let hello = "hello"
|
|
@ -0,0 +1 @@
|
|||
val hello : string
|
|
@ -0,0 +1,3 @@
|
|||
let () =
|
||||
print_endline Lib.Sub.hello;
|
||||
()
|
|
@ -0,0 +1,8 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps (main.exe))
|
||||
(action (run ${<}))))
|
||||
|
||||
(executable ((name main)))
|
|
@ -0,0 +1 @@
|
|||
module Sub = Lib_sub
|
|
@ -0,0 +1 @@
|
|||
let hello = "hello"
|
|
@ -0,0 +1,3 @@
|
|||
let () =
|
||||
print_endline Lib.Sub.hello;
|
||||
()
|
|
@ -0,0 +1,22 @@
|
|||
When there are explicit interfaces, modules must be rebuilt.
|
||||
|
||||
$ jbuilder runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering
|
||||
main alias runtest
|
||||
hello
|
||||
$ echo 'let x = 1' >> explicit-interfaces/lib_sub.ml
|
||||
$ jbuilder runtest --root explicit-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt
|
||||
File "_none_", line 1:
|
||||
Error: Files .main.eobjs/main.cmx and .main.eobjs/lib_sub.cmx
|
||||
make inconsistent assumptions over implementation Lib_sub
|
||||
|
||||
When there are no interfaces, the situation is the same, but it is not possible
|
||||
to rely on these.
|
||||
|
||||
$ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering
|
||||
main alias runtest
|
||||
hello
|
||||
$ echo 'let x = 1' >> no-interfaces/lib_sub.ml
|
||||
$ jbuilder runtest --root no-interfaces --display quiet -j1 2>&1 | grep -v Entering | grep -v ocamlopt
|
||||
File "_none_", line 1:
|
||||
Error: Files .main.eobjs/main.cmx and .main.eobjs/lib_sub.cmx
|
||||
make inconsistent assumptions over interface Lib_sub
|
Loading…
Reference in New Issue