Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: handling of variables



Bart Schaefer wrote:
> Hmm, though, I suppose we should have added regression tests for those
> bug fixes.

Index: Test/A06assign.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/A06assign.ztst,v
retrieving revision 1.2
diff -u -r1.2 A06assign.ztst
--- Test/A06assign.ztst	7 Jul 2004 15:40:57 -0000	1.2
+++ Test/A06assign.ztst	2 Feb 2005 16:50:56 -0000
@@ -264,3 +264,16 @@
 >hello
 >hello
 >hello
+
+ repeat 10 FOO=BAR BAR=FOO echo $FOO $BAR
+0:save and restore multiple variables around builtin
+>
+>
+>
+>
+>
+>
+>
+>
+>
+>
Index: Test/C02cond.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v
retrieving revision 1.14
diff -u -r1.14 C02cond.ztst
--- Test/C02cond.ztst	17 Mar 2004 14:22:20 -0000	1.14
+++ Test/C02cond.ztst	2 Feb 2005 16:50:56 -0000
@@ -195,6 +195,16 @@
   [ `echo 0` -lt `echo 1` ]
 0:substituion in `[' builtin
 
+  fn() {
+    # careful: first file must exist to trigger bug
+    [[ -e unmodified ]] || print Where\'s my file\?
+    [[ unmodified -nt NonExistentFile ]]
+    print status = $?
+  }
+  fn
+0:-nt shouldn't abort on non-existent files
+>status = 1
+
 %clean
   # This works around a bug in rm -f in some versions of Cygwin
   chmod 644 unmodish


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited. 
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author