Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
  • Loading branch information
nojb committed Jul 31, 2019
1 parent d4aad9f commit 70adc42
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,14 @@
test-cases/windows-diff
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name with-stdin-from)
(deps (package dune) (source_tree test-cases/with-stdin-from))
(action
(chdir
test-cases/with-stdin-from
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name workspace-paths)
(deps (package dune) (source_tree test-cases/workspace-paths))
Expand Down Expand Up @@ -1852,6 +1860,7 @@
(alias vlib-default-impl)
(alias vlib-wrong-default-impl)
(alias windows-diff)
(alias with-stdin-from)
(alias workspace-paths)
(alias workspaces)
(alias wrapped-false-main-module-name)
Expand Down Expand Up @@ -2028,6 +2037,7 @@
(alias vlib-default-impl)
(alias vlib-wrong-default-impl)
(alias windows-diff)
(alias with-stdin-from)
(alias workspace-paths)
(alias workspaces)
(alias wrapped-false-main-module-name)
Expand Down
5 changes: 5 additions & 0 deletions test/blackbox-tests/test-cases/with-stdin-from/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(rule (with-stdout-to input.txt (echo "Hello!\n")))

(alias
(name runtest)
(action (with-stdin-from input.txt (run cat))))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 1.12)
3 changes: 3 additions & 0 deletions test/blackbox-tests/test-cases/with-stdin-from/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$ dune runtest --display short
cat alias runtest
Hello!

0 comments on commit 70adc42

Please sign in to comment.