summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-05-13 08:16:50 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-05-13 08:16:50 -0700
commit9d47e8398d299e53ffe4e7ddf3731d2fedae9948 (patch)
treee8aac53f99702a84e9a8ba27046d9a59ce619e5d /Test
parent32603: fix documentation of status after try / always (diff)
downloadzsh-9d47e8398d299e53ffe4e7ddf3731d2fedae9948.tar
zsh-9d47e8398d299e53ffe4e7ddf3731d2fedae9948.tar.gz
zsh-9d47e8398d299e53ffe4e7ddf3731d2fedae9948.tar.bz2
zsh-9d47e8398d299e53ffe4e7ddf3731d2fedae9948.tar.lz
zsh-9d47e8398d299e53ffe4e7ddf3731d2fedae9948.tar.xz
zsh-9d47e8398d299e53ffe4e7ddf3731d2fedae9948.tar.zst
zsh-9d47e8398d299e53ffe4e7ddf3731d2fedae9948.zip
32609: [[ $var ]] behaves as [[ -n $var ]] for bash/ksh compatibility
Also restore ksh [ -t ] compatibility when POSIX_BUILTINS is not set, and allow operators defined by modules to be called with no arguments, although this affects only runtime interpretation, not parsing.
Diffstat (limited to 'Test')
-rw-r--r--Test/C02cond.ztst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 94fca8b68..69001476c 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -349,6 +349,14 @@ F:Failures in these cases do not indicate a problem in the shell.
>0
>1
+ foo=''
+ [[ $foo ]] || print foo is empty
+ foo=full
+ [[ $foo ]] && print foo is full
+0:bash compatibility with single [[ ... ]] argument
+>foo is empty
+>foo is full
+
%clean
# This works around a bug in rm -f in some versions of Cygwin
chmod 644 unmodish