Add tests for fallback
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
aee019577b
commit
8b5e1a9a13
|
@ -128,6 +128,14 @@
|
||||||
test-cases/exec-cmd
|
test-cases/exec-cmd
|
||||||
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
|
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
|
||||||
|
|
||||||
|
(alias
|
||||||
|
(name fallback-dune)
|
||||||
|
(deps (package dune) (source_tree test-cases/fallback-dune))
|
||||||
|
(action
|
||||||
|
(chdir
|
||||||
|
test-cases/fallback-dune
|
||||||
|
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
(name findlib)
|
(name findlib)
|
||||||
(deps (package dune) (source_tree test-cases/findlib))
|
(deps (package dune) (source_tree test-cases/findlib))
|
||||||
|
@ -606,6 +614,7 @@
|
||||||
(alias env)
|
(alias env)
|
||||||
(alias exclude-missing-module)
|
(alias exclude-missing-module)
|
||||||
(alias exec-cmd)
|
(alias exec-cmd)
|
||||||
|
(alias fallback-dune)
|
||||||
(alias findlib)
|
(alias findlib)
|
||||||
(alias findlib-error)
|
(alias findlib-error)
|
||||||
(alias force-test)
|
(alias force-test)
|
||||||
|
@ -678,6 +687,7 @@
|
||||||
(alias env)
|
(alias env)
|
||||||
(alias exclude-missing-module)
|
(alias exclude-missing-module)
|
||||||
(alias exec-cmd)
|
(alias exec-cmd)
|
||||||
|
(alias fallback-dune)
|
||||||
(alias findlib)
|
(alias findlib)
|
||||||
(alias findlib-error)
|
(alias findlib-error)
|
||||||
(alias force-test)
|
(alias force-test)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
(rule
|
||||||
|
(fallback)
|
||||||
|
(targets)
|
||||||
|
(action (with-stdout-to foo.txt (echo "testing"))))
|
|
@ -0,0 +1,4 @@
|
||||||
|
(rule
|
||||||
|
(fallback false)
|
||||||
|
(targets)
|
||||||
|
(action (with-stdout-to foo.txt (echo "testing"))))
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
(rule
|
||||||
|
((fallback)
|
||||||
|
(targets (foo.txt))
|
||||||
|
(action (with-stdout-to foo.txt (echo "testing")))))
|
|
@ -0,0 +1,20 @@
|
||||||
|
fallback isn't allowed in dune
|
||||||
|
|
||||||
|
$ dune build --root dune1
|
||||||
|
Info: creating file dune-project with this contents: (lang dune 1.0)
|
||||||
|
File "dune", line 2, characters 1-11:
|
||||||
|
Error: 'fallback' was renamed to '(mode fallback)' in 1.0 of the dune language
|
||||||
|
[1]
|
||||||
|
|
||||||
|
2nd fallback form isn't allowed either
|
||||||
|
|
||||||
|
$ dune build --root dune2
|
||||||
|
Info: creating file dune-project with this contents: (lang dune 1.0)
|
||||||
|
File "dune", line 2, characters 1-17:
|
||||||
|
Error: 'fallback' was renamed to '(mode fallback)' in 1.0 of the dune language
|
||||||
|
[1]
|
||||||
|
|
||||||
|
But it is allowed in jbuilder
|
||||||
|
|
||||||
|
$ jbuilder build --root jbuild
|
||||||
|
Entering directory 'jbuild'
|
Loading…
Reference in New Issue