summaryrefslogtreecommitdiffstats
path: root/tools/regression
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-01-13 22:35:51 +0000
committerjilles <jilles@FreeBSD.org>2013-01-13 22:35:51 +0000
commitadc48be9c2cb5d0a6d697fad9295ad97cd636a5a (patch)
tree45eee5795fe543c3ab7add1c609d292d4a61002b /tools/regression
parent89fb0f254358fa3cbe1f95560d01fbec42006840 (diff)
downloadFreeBSD-src-adc48be9c2cb5d0a6d697fad9295ad97cd636a5a.zip
FreeBSD-src-adc48be9c2cb5d0a6d697fad9295ad97cd636a5a.tar.gz
sh: Add testcase that $? is preserved into a simple command substitution.
The test builtins/trap6.0 already uses this but having it separate eases diagnosis if this would break.
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/bin/sh/expansion/cmdsubst16.05
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/expansion/cmdsubst16.0 b/tools/regression/bin/sh/expansion/cmdsubst16.0
new file mode 100644
index 0000000..71df562
--- /dev/null
+++ b/tools/regression/bin/sh/expansion/cmdsubst16.0
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+f() { return 3; }
+f
+[ `echo $?` = 3 ]
OpenPOWER on IntegriCloud