-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See #842 Signed-off-by: Etienne Millon <etienne@cryptosense.com>
- Loading branch information
Showing
14 changed files
with
131 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
$ dune runtest --display short | ||
File "dune", line 63, characters 19-42: | ||
File "dune", line 44, characters 19-42: | ||
Warning: Directory dir-that-doesnt-exist doesn't exist. | ||
diff alias runtest | ||
diff alias runtest | ||
diff alias runtest | ||
diff alias runtest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(rule (write-file generated-file dynamic-contents)) | ||
|
||
(alias | ||
(name test-dep) | ||
(action (cat %{dep:generated-file}))) | ||
|
||
(alias | ||
(name test-path) | ||
(action | ||
(chdir | ||
sub-tree/dir | ||
(progn | ||
(echo "%{path:file-that-does-not-exist}\n") | ||
(echo "%{path:.}\n"))))) | ||
|
||
(alias | ||
(name test-path-no-dep) | ||
(action | ||
(chdir | ||
sub-tree/dir | ||
(progn | ||
(echo "%{path-no-dep:file-that-does-not-exist}\n") | ||
(echo "%{path-no-dep:.}\n"))))) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/path-variables/dune/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 1.0) |
5 changes: 5 additions & 0 deletions
5
test/blackbox-tests/test-cases/path-variables/jbuild-invalid/jbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(rule (write-file generated-file dynamic-contents)) | ||
|
||
(alias | ||
((name test-dep) | ||
(action (cat ${dep:generated-file})))) |
14 changes: 14 additions & 0 deletions
14
test/blackbox-tests/test-cases/path-variables/jbuild/jbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(rule (write-file generated-file dynamic-contents)) | ||
|
||
(alias | ||
((name test-path) | ||
(action (cat ${path:generated-file})))) | ||
|
||
(alias | ||
((name test-path-no-dep) | ||
(action | ||
(chdir | ||
sub-tree/dir | ||
(progn | ||
(echo "${path-no-dep:file-that-does-not-exist}\n") | ||
(echo "${path-no-dep:.}\n")))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
dune files | ||
========== | ||
|
||
%{dep:string} | ||
------------- | ||
|
||
In expands to a file name, and registers this as a dependency. | ||
|
||
$ dune build --root dune @test-dep | ||
Entering directory 'dune' | ||
dynamic-contents | ||
|
||
%{path-no-dep:string} | ||
--------------------- | ||
|
||
It expands to a file name, but does not register it as a dependency. | ||
|
||
$ dune build --root dune @test-path-no-dep | ||
Entering directory 'dune' | ||
../../file-that-does-not-exist | ||
../.. | ||
|
||
jbuild files | ||
============ | ||
|
||
${path:string} | ||
-------------- | ||
|
||
This registers the dependency: | ||
|
||
$ dune build --root jbuild @test-path | ||
Entering directory 'jbuild' | ||
dynamic-contents | ||
|
||
${path-no-dep:string} | ||
--------------------- | ||
|
||
This does not: | ||
|
||
$ dune build --root jbuild @test-path-no-dep | ||
Entering directory 'jbuild' | ||
../../file-that-does-not-exist | ||
../.. | ||
|
||
${dep:string} | ||
-------------- | ||
|
||
This form does not exist, but displays an hint: | ||
|
||
$ dune build --root jbuild-invalid @test-dep | ||
Entering directory 'jbuild-invalid' | ||
File "jbuild", line 5, characters 16-37: | ||
Error: ${dep:generated-file} is not supported in jbuild files. | ||
Did you mean: ${path:generated-file} | ||
[1] |