aboutsummaryrefslogtreecommitdiff
path: root/tools/regression
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2013-11-22 21:50:13 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2013-11-22 21:50:13 +0000
commitc2fd50d77a512775ce2173a878f3715ad9198ae3 (patch)
tree89c3083d30c27ec58f234ff759248bf76038c4f9 /tools/regression
parent116e43f021f5a96abd7b7616374b8d23d73953e9 (diff)
downloadsrc-c2fd50d77a512775ce2173a878f3715ad9198ae3.tar.gz
src-c2fd50d77a512775ce2173a878f3715ad9198ae3.zip
sh: Add tests for the </dev/null implicit in a background command.
Notes
Notes: svn path=/head/; revision=258489
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/bin/sh/execution/bg5.04
-rw-r--r--tools/regression/bin/sh/execution/bg6.04
-rw-r--r--tools/regression/bin/sh/execution/bg6.0.stdout1
3 files changed, 9 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/execution/bg5.0 b/tools/regression/bin/sh/execution/bg5.0
new file mode 100644
index 000000000000..cc9ceaa41d4e
--- /dev/null
+++ b/tools/regression/bin/sh/execution/bg5.0
@@ -0,0 +1,4 @@
+# $FreeBSD$
+# A background command has an implicit </dev/null redirection.
+
+echo bad | ${SH} -c '{ cat & wait; }'
diff --git a/tools/regression/bin/sh/execution/bg6.0 b/tools/regression/bin/sh/execution/bg6.0
new file mode 100644
index 000000000000..b0faf9e73708
--- /dev/null
+++ b/tools/regression/bin/sh/execution/bg6.0
@@ -0,0 +1,4 @@
+# $FreeBSD$
+# The redirection overrides the </dev/null implicit in a background command.
+
+echo yes | ${SH} -c '{ cat & wait; } </dev/stdin'
diff --git a/tools/regression/bin/sh/execution/bg6.0.stdout b/tools/regression/bin/sh/execution/bg6.0.stdout
new file mode 100644
index 000000000000..7cfab5b05d62
--- /dev/null
+++ b/tools/regression/bin/sh/execution/bg6.0.stdout
@@ -0,0 +1 @@
+yes