Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [bug] "zmodload -F zsh/system -p:errnos" disables $sysparams instead of $errnos
On Wed, 7 Sep 2016 11:35:29 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> It looks like this is because math functions were never properly counted
> --- there are very few in modules so no one noticed. We could do with
> some tests for this.
pws
diff --git a/Test/V01zmodload.ztst b/Test/V01zmodload.ztst
index 349ae9c..092f9d1 100644
--- a/Test/V01zmodload.ztst
+++ b/Test/V01zmodload.ztst
@@ -271,6 +271,80 @@
0:Listing feature autoloads includes unloaded modules
>zmodload -Fa zsh/zftp b:zftp
+ if ! zmodload zsh/system >/dev/null 2>&1; then
+ ZTST_skip="zsh/system module not available"
+ else
+ zmodload -lF zsh/system
+ zmodload -F zsh/system -p:errnos
+ print ${+errnos}
+ zmodload -lF zsh/system
+ zmodload -F zsh/system +p:errnos
+ print ${+errnos}
+ zmodload -lF zsh/system
+ fi
+0:Regression tests for index bug with math functions.
+>+b:syserror
+>+b:sysread
+>+b:syswrite
+>+b:sysopen
+>+b:sysseek
+>+b:zsystem
+>+f:systell
+>+p:errnos
+>+p:sysparams
+>0
+>+b:syserror
+>+b:sysread
+>+b:syswrite
+>+b:sysopen
+>+b:sysseek
+>+b:zsystem
+>+f:systell
+>-p:errnos
+>+p:sysparams
+>1
+>+b:syserror
+>+b:sysread
+>+b:syswrite
+>+b:sysopen
+>+b:sysseek
+>+b:zsystem
+>+f:systell
+>+p:errnos
+>+p:sysparams
+
+ if ! zmodload zsh/system >/dev/null 2>&1; then
+ ZTST_skip="zsh/system module not available"
+ else
+ zmodload -F zsh/system -f:systell
+ zmodload -lF zsh/system
+ (print $(( systell(-1) )))
+ zmodload -F zsh/system +f:systell
+ zmodload -lF zsh/system
+ (print $(( systell(-1) )))
+ fi
+1:Module Features for math functions
+>+b:syserror
+>+b:sysread
+>+b:syswrite
+>+b:sysopen
+>+b:sysseek
+>+b:zsystem
+>-f:systell
+>+p:errnos
+>+p:sysparams
+>+b:syserror
+>+b:sysread
+>+b:syswrite
+>+b:sysopen
+>+b:sysseek
+>+b:zsystem
+>+f:systell
+>+p:errnos
+>+p:sysparams
+?(eval):6: unknown function: systell
+?(eval):9: file descriptor out of range
+
%clean
eval "$deps"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author