summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2010-12-27 23:56:03 +0000
committerjilles <jilles@FreeBSD.org>2010-12-27 23:56:03 +0000
commit812e01538de99ca72ec0a86ab2b6c23b85f4422f (patch)
tree435b2ec16d5d4f0ab651b053f20d2b2b1f42cc64
parentdc1647ef815019d4ea14435a8df1f32dc933076b (diff)
downloadFreeBSD-src-812e01538de99ca72ec0a86ab2b6c23b85f4422f.zip
FreeBSD-src-812e01538de99ca72ec0a86ab2b6c23b85f4422f.tar.gz
sh: Add a testcase for cmdsubst errors that already works properly.
If a command substitution consists of one special builtin and there is a redirection error, this should not abort the outer shell. It was fixed in r201366 by ignoring special builtin properties for command substitutions consisting of one builtin.
-rw-r--r--tools/regression/bin/sh/expansion/cmdsubst4.04
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/expansion/cmdsubst4.0 b/tools/regression/bin/sh/expansion/cmdsubst4.0
new file mode 100644
index 0000000..ee1ce73
--- /dev/null
+++ b/tools/regression/bin/sh/expansion/cmdsubst4.0
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+exec 2>/dev/null
+! y=$(: </var/empty/nonexistent)
OpenPOWER on IntegriCloud