about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/A01grammar.ztst6
-rw-r--r--Test/C04funcdef.ztst7
-rw-r--r--Test/D08cmdsubst.ztst5
3 files changed, 18 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index 1fe249869..3b3f2f915 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -553,3 +553,9 @@
 0:Last status of successfully executed "." file is retained
 >1
 >0
+
+  echo 'echo $?' >dot_status
+  false
+  . ./dot_status
+0:"." file sees status from previous command
+>1
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst
index 338c36fab..f71e5ce77 100644
--- a/Test/C04funcdef.ztst
+++ b/Test/C04funcdef.ztst
@@ -15,6 +15,13 @@
   fnz
 0:Empty function body resets status
 
+  fn3() { return 3; }
+  fnstat() { print $?; }
+  fn3
+  fnstat
+0:Status is not reset on non-empty function body
+>3
+
   function f$$ () {
     print regress expansion of function names
   }
diff --git a/Test/D08cmdsubst.ztst b/Test/D08cmdsubst.ztst
index 1b5c7f728..9962c6cad 100644
--- a/Test/D08cmdsubst.ztst
+++ b/Test/D08cmdsubst.ztst
@@ -93,3 +93,8 @@
  false
  ``
 0:Empty command substitution resets status
+
+ false
+ echo `echo $?`
+0:Non-empty command substitution inherits status
+>1