Add tests for aliases
This commit is contained in:
parent
8466924a73
commit
63e8a76006
|
@ -71,3 +71,10 @@
|
|||
(action
|
||||
(chdir test-cases/copy_files
|
||||
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t))))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((files_recursively_in test-cases/aliases)))
|
||||
(action
|
||||
(chdir test-cases/aliases
|
||||
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t))))))
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(alias
|
||||
((name just-in-src)
|
||||
(deps ((alias src/x)))))
|
||||
|
||||
(alias
|
||||
((name everywhere)
|
||||
(deps ((alias_rec x)))))
|
|
@ -0,0 +1,22 @@
|
|||
$ $JBUILDER clean -j1 --root .
|
||||
$ $JBUILDER build -j1 --root . @just-in-src
|
||||
running in src
|
||||
$ $JBUILDER clean -j1 --root .
|
||||
$ $JBUILDER build -j1 --root . @everywhere
|
||||
running in src/foo/bar
|
||||
running in src/foo/baz
|
||||
running in src
|
||||
$ $JBUILDER clean -j1 --root .
|
||||
$ $JBUILDER build -j1 --root . @x
|
||||
running in src/foo/bar
|
||||
running in src/foo/baz
|
||||
running in src
|
||||
$ $JBUILDER build -j1 --root . @plop
|
||||
File "<command-line>", line 1, characters 0-0:
|
||||
Error: This recursive alias is empty.
|
||||
Alias "plop" is not defined in . or any of its descendants.
|
||||
[1]
|
||||
$ $JBUILDER build -j1 --root . @truc/x
|
||||
File "<command-line>", line 1, characters 0-0:
|
||||
Error: Don't know about directory truc!
|
||||
[1]
|
|
@ -0,0 +1,5 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(alias
|
||||
((name x)
|
||||
(action (chdir ${ROOT} (echo "running in ${path-no-dep:.}\n")))))
|
|
@ -0,0 +1,5 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(alias
|
||||
((name x)
|
||||
(action (chdir ${ROOT} (echo "running in ${path-no-dep:.}\n")))))
|
|
@ -0,0 +1,5 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(alias
|
||||
((name x)
|
||||
(action (chdir ${ROOT} (echo "running in ${path-no-dep:.}\n")))))
|
Loading…
Reference in New Issue