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

Re: zsh-4.3.9 test failure due to localization



On Tue, 04 Nov 2008 01:57:01 +0100
Bernd Steinhauser <linux@xxxxxxxxxxxxxxxxxxxx> wrote:
> sorry to bother you again with a test failure bug. :)
> One of the tests fails if the output is localized:
> 
> ./C05debug.ztst: starting. 
> ! ./zsh-trapreturn-bug2:5: no such file or directory: ./fdasfsdafd 
> --- 1 ---- 
> ! ./zsh-trapreturn-bug2:5: datei oder Verzeichnis nicht gefunden: 

Thanks, that's worth knowing about.

We sanitize the locale if it's been tinkered with but starting a new shell
even with "zsh -f" is particularly susceptible to problems.  Anyway, we
shouldn't be relying on details of system error messages.

Index: Test/C05debug.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/C05debug.ztst,v
retrieving revision 1.3
diff -u -r1.3 C05debug.ztst
--- Test/C05debug.ztst	1 Oct 2008 11:34:48 -0000	1.3
+++ Test/C05debug.ztst	4 Nov 2008 09:47:46 -0000
@@ -52,9 +52,15 @@
 	# Failure
 	exit 10
 	HERE
-  $ZTST_testdir/../Src/zsh -f ./zsh-trapreturn-bug2
+  $ZTST_testdir/../Src/zsh -f ./zsh-trapreturn-bug2 2>erroutput.dif
+  mystat=$?
+  (
+   setopt extendedglob
+   print ${"$(< erroutput.dif)"%%:[^:]#: ./fdasfsdafd}
+  )
+  (( mystat == 0 ))
 0: trapreturn handling bug is properly fixed
-?./zsh-trapreturn-bug2:5: no such file or directory: ./fdasfsdafd
+>./zsh-trapreturn-bug2:5
 
   fn() {
     setopt localtraps localoptions debugbeforecmd


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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