summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-01-27 23:08:20 +0000
committerjilles <jilles@FreeBSD.org>2011-01-27 23:08:20 +0000
commit15823a2b441d4aa55f96fa41542a0baeb85057c8 (patch)
treea9a5cc595bec21b3de83c28541c9616c67dca7c7 /tools
parent9ef096a59109a579e49be6857beebf85373b199c (diff)
downloadFreeBSD-src-15823a2b441d4aa55f96fa41542a0baeb85057c8.zip
FreeBSD-src-15823a2b441d4aa55f96fa41542a0baeb85057c8.tar.gz
sh: Add test for EXIT trap in command substitution.
This is not really realistic but is an opposition to $(trap).
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/builtins/trap7.03
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/trap7.0 b/tools/regression/bin/sh/builtins/trap7.0
new file mode 100644
index 0000000..35529b8
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/trap7.0
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+[ "$(trap 'echo trapped' EXIT)" = trapped ]
OpenPOWER on IntegriCloud