sh: Test EXIT trap with multiple statements in it
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 5 Feb 2012 20:43:12 +0000 (12:43 -0800)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 5 Feb 2012 20:48:30 +0000 (12:48 -0800)
Obtained-from:  FreeBSD 230211

tools/regression/bin/sh/builtins/trap9.0 [new file with mode: 0644]

diff --git a/tools/regression/bin/sh/builtins/trap9.0 b/tools/regression/bin/sh/builtins/trap9.0
new file mode 100644 (file)
index 0000000..4059db4
--- /dev/null
@@ -0,0 +1,3 @@
+# $FreeBSD: src/tools/regression/bin/sh/builtins/trap9.0,v 1.1 2012/01/16 10:59:44 dumbbell Exp $
+
+test "$(trap 'printf trap; echo ped' EXIT; f() { :; }; f)" = trapped || exit 1