summaryrefslogtreecommitdiffstats
path: root/tests/exec9.sub
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/exec9.sub20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/exec9.sub b/tests/exec9.sub
new file mode 100644
index 0000000..b8d20b4
--- /dev/null
+++ b/tests/exec9.sub
@@ -0,0 +1,20 @@
+# make sure commands before the last one in the pipeline can't change $?
+false
+false | echo $?
+false
+(false) | echo $?
+
+false
+true | echo $?
+false
+(true) | echo $?
+
+true
+false | echo $?
+true
+(false) | echo $?
+
+true
+true | echo $?
+true
+(true) | echo $?