aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-misc/assignment5.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-misc/assignment5.tests')
-rwxr-xr-xshell/ash_test/ash-misc/assignment5.tests9
1 files changed, 9 insertions, 0 deletions
diff --git a/shell/ash_test/ash-misc/assignment5.tests b/shell/ash_test/ash-misc/assignment5.tests
new file mode 100755
index 000000000..0b8104285
--- /dev/null
+++ b/shell/ash_test/ash-misc/assignment5.tests
@@ -0,0 +1,9 @@
+true; a=1; echo Zero1:$?
+false; a=1; echo Zero2:$?
+false || a=1; echo Zero3:$?
+
+false || x=$? y=`echo $?`; echo Zero4:$? x:$x y:$y
+false || x=$? y=`echo $?; exit 3`; echo Three:$? x:$x y:$y
+
+#ash sets z=1 instead of z=3. disabled for now
+#false || x=$? y=`echo $?; exit 3` z=`echo $?`; echo x:$x y:$y z:$z