diff options
author | jilles <jilles@FreeBSD.org> | 2013-01-13 22:35:51 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-01-13 22:35:51 +0000 |
commit | adc48be9c2cb5d0a6d697fad9295ad97cd636a5a (patch) | |
tree | 45eee5795fe543c3ab7add1c609d292d4a61002b /tools/regression | |
parent | 89fb0f254358fa3cbe1f95560d01fbec42006840 (diff) | |
download | FreeBSD-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.0 | 5 |
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 ] |