diff options
author | Bart Schaefer <schaefer@ipost.com> | 2021-04-12 13:59:06 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@ipost.com> | 2021-04-12 13:59:06 -0700 |
commit | b3613e4895f7b059558c4ef211189b516dbf903d (patch) | |
tree | 5ac6989a564cfb079b73a1f13a3d2a89ff881bb9 /Test | |
parent | e67ccd7f1efae7696dc17f6e3e720cd994e90155 (diff) | |
download | zsh-b3613e4895f7b059558c4ef211189b516dbf903d.tar.gz zsh-b3613e4895f7b059558c4ef211189b516dbf903d.tar.xz zsh-b3613e4895f7b059558c4ef211189b516dbf903d.zip |
Change TYPESET_DOES_NOT_SET to TYPESET_TO_UNSET to avoid double-negative
Diffstat (limited to 'Test')
-rw-r--r-- | Test/D06subscript.ztst | 5 | ||||
-rw-r--r-- | Test/E03posix.ztst | 45 |
2 files changed, 49 insertions, 1 deletions
diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst index c1a8d79cf..4225c543c 100644 --- a/Test/D06subscript.ztst +++ b/Test/D06subscript.ztst @@ -289,3 +289,8 @@ F:Regression test for workers/42297 >14 24 >b b >b?rbaz foob?r + + i=1,3 + [[ ${a[$i]} = ${a[i]} ]] +0f:Math evaluation of commas in array subscripts +F:In math, (($i)) should be the same as ((i)). diff --git a/Test/E03posix.ztst b/Test/E03posix.ztst index a2769f3aa..fb394986d 100644 --- a/Test/E03posix.ztst +++ b/Test/E03posix.ztst @@ -4,7 +4,7 @@ # %prep - setopt POSIX_BUILTINS TYPESET_DOES_NOT_SET + setopt POSIX_BUILTINS TYPESET_TO_UNSET %test @@ -117,3 +117,46 @@ } 0:readonly with typeset -p >typeset -g -r var + +# Tests expected to fail + + echo - +0f:A single "-" for echo does not end the arguments +F:POSIX requires a solitary "-" to be a plain argument +>- + + ARGV0=sh $ZTST_testdir/../Src/zsh -c 'foreach() { true; }' +-f:"foreach" is not a reserved word + + ARGV0=sh $ZTST_testdir/../Src/zsh -c 'end() { true; } +-f:"end" is not a reserved word + + a='a:b:' ARGV0=sh $ZTST_testdir/../Src/zsh -c 'IFS=:; printf "<%s>\n" $a' +0f:IFS is a separator, not a delimiter +><a> +><b> + + a=$'\ra\r\rb' ARGV0=sh $ZTST_testdir/../Src/zsh -c 'IFS=:; printf "<%s>\n" $a' +0f:All whitespace characters are "IFS whitespace" +F:isspace('\r') is true so \r should behave like space, \t, \n +F:This may also need to apply to multibyte whitespace +><a> +><b> + + ARGV0=sh $ZTST_testdir/../Src/zsh -c 'IFS=2; printf "<%s>\n" $((11*11))' +0f:IFS applies to math results (numbers treated as strings) +><1> +><1> + + ARGV0=sh $ZTST_testdir/../Src/zsh -c 'inf=42; echo $((inf))' +0f:The math constant Inf is case-sensitive, with capital I +>42 + + ARGV0=sh $ZTST_testdir/../Src/zsh -c 'EUID=10; echo "$EUID"' +-f:EUID is not a special variable +>10 + + ARGV0=sh $ZTST_testdir/../Src/zsh -c "printf '<%10s>\n' St$'\M-C\M-)'phane" +0f:Width of %s is computed in bytes not characters +F:This is considered a bugfix in zsh +>< Stéphane> |