[Pkg-zsh-devel] zsh 5.2-test-1

Peter Stephenson p.w.stephenson at ntlworld.com
Sun Dec 4 17:08:02 UTC 2016


On Sun, 4 Dec 2016 17:42:19 +0100
Axel Beckert <abe at deuxchevaux.org> wrote:
> 14:34:54 Running test: interactive shell returns to top level on ${...?...} error
> 14:34:54 --- /tmp/zsh.ztst.err.25583	 2016-12-04 13:34:54.074183275 +0000
> 14:34:54 +++ /tmp/zsh.ztst.terr.25583	 2016-12-04 13:34:54.078183275 +0000
> 14:34:54 @@ -1 +1 @@
> 14:34:54 -foo:1: 1: no arguments given
> 14:34:54 +%  
>  
> %  
>  
> foo:1: 1: no arguments given
> 14:34:54 Test ../../Test/D04parameter.ztst failed: error output differs from expected as shown above for:
> 14:34:54   PROMPT="" $ZTST_testdir/../Src/zsh -fis <<<'
> 14:34:54   unsetopt PROMPT_SP
> 14:34:54   PS2="" PS3="" PS4="" RPS1="" RPS2=""
> 14:34:54   foo() {
> 14:34:54       print ${1:?no arguments given}
> 14:34:54       print not reached
> 14:34:54   }
> 14:34:54   foo
> 14:34:54   print reached
> 14:34:54   '
> 14:34:54 Was testing: interactive shell returns to top level on ${...?...} error
> 14:34:54 ../../Test/D04parameter.ztst: test failed.

I would guess this is some I/O oddity --- buffering would be the most
likely suspect.  The output gets tested before the error stream, so
evidently that's printed "reached" as expected.  That's the only
interactive test in that file.

I see in a copule of similar tests in A02alias.ztst we've assigned
2>&1.  In the W01history.ztst tests we're sending 2>/dev/null.  But this
is murky...

pws

diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 834550c..87cd90d 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -98,6 +98,7 @@
   PROMPT="" $ZTST_testdir/../Src/zsh -fis <<<'
   unsetopt PROMPT_SP
   PS2="" PS3="" PS4="" RPS1="" RPS2=""
+  exec 2>&1
   foo() {
       print ${1:?no arguments given}
       print not reached
@@ -106,7 +107,7 @@
   print reached
   '
 0:interactive shell returns to top level on ${...?...} error
-?foo:1: 1: no arguments given
+>foo:1: 1: no arguments given
 >reached
 
   print ${set1:+word1} ${set1+word2} ${null1:+word3} ${null1+word4}




More information about the Pkg-zsh-devel mailing list