summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2018-10-18 16:33:38 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2018-10-18 16:38:52 +0200
commitba56beab291152581e2e525f42247f01200dfe9a (patch)
tree701338dfc463e041152a6a69d3a664836a09ff52
parent4c84d05346eaa00f564b4c2b43fc0e77eac021cb (diff)
+ test handling of dofile that writes to $3 and stdout
-rw-r--r--stdout-and-$3/all.do4
-rw-r--r--stdout-and-$3/bogus.do3
2 files changed, 7 insertions, 0 deletions
diff --git a/stdout-and-$3/all.do b/stdout-and-$3/all.do
new file mode 100644
index 0000000..a6d65eb
--- /dev/null
+++ b/stdout-and-$3/all.do
@@ -0,0 +1,4 @@
+#!/bin/sh
+redo-ifchange bogus \
+ && printf >&2 'FAIL: Write to $3 and stdout possible.\n' \
+ || printf >&2 'PASS: Write to $3 and stdout impossible.\n'
diff --git a/stdout-and-$3/bogus.do b/stdout-and-$3/bogus.do
new file mode 100644
index 0000000..22fa07f
--- /dev/null
+++ b/stdout-and-$3/bogus.do
@@ -0,0 +1,3 @@
+#!/bin/sh
+printf 'stdout'
+printf '$3' >$3