Skip to content

Commit 9406ba9

Browse files
committed
Add a test for promoting from a nonexistent subdir
1 parent d29cb85 commit 9406ba9

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

Diff for: test/blackbox-tests/dune.inc

+13
Original file line numberDiff line numberDiff line change
@@ -1894,6 +1894,17 @@
18941894
test-cases/no-name-field
18951895
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))
18961896

1897+
(rule
1898+
(alias nonexistent-subdir)
1899+
(deps
1900+
(package dune)
1901+
(source_tree test-cases/nonexistent-subdir)
1902+
(alias test-deps))
1903+
(action
1904+
(chdir
1905+
test-cases/nonexistent-subdir
1906+
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))
1907+
18971908
(rule
18981909
(alias null-dep)
18991910
(deps (package dune) (source_tree test-cases/null-dep) (alias test-deps))
@@ -3197,6 +3208,7 @@
31973208
(alias no-infer)
31983209
(alias no-installable-mode)
31993210
(alias no-name-field)
3211+
(alias nonexistent-subdir)
32003212
(alias null-dep)
32013213
(alias ocaml-config-macro)
32023214
(alias ocaml-syntax)
@@ -3479,6 +3491,7 @@
34793491
(alias no-infer)
34803492
(alias no-installable-mode)
34813493
(alias no-name-field)
3494+
(alias nonexistent-subdir)
34823495
(alias null-dep)
34833496
(alias ocaml-config-macro)
34843497
(alias ocaml-syntax)
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(subdir "x"
2+
(rule
3+
(mode (promote (until-clean)))
4+
(action (with-stdout-to y (echo "z")))))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(lang dune 2.5)
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Check that promoting from a nonexistent subdir doesn't cause crashes.
2+
$ dune build x/y
3+
$ cat x/y
4+
z

0 commit comments

Comments
 (0)