diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-22 16:32:36 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-22 16:32:36 +0000 |
commit | 3f3d80c394134cae020c49420917eb34a456ff68 (patch) | |
tree | ebf7140e93ee7fc2ea64a8843b2f770244e35ddf /Test/E01options.ztst | |
parent | 91564ce04c65576540a76612f6b292c9d574049f (diff) | |
download | zsh-3f3d80c394134cae020c49420917eb34a456ff68.tar.gz zsh-3f3d80c394134cae020c49420917eb34a456ff68.tar.xz zsh-3f3d80c394134cae020c49420917eb34a456ff68.zip |
28360: NO_UNSET option should check parameters with trailing options
Diffstat (limited to 'Test/E01options.ztst')
-rw-r--r-- | Test/E01options.ztst | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/Test/E01options.ztst b/Test/E01options.ztst index 410944643..be83ceccd 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -998,7 +998,7 @@ >two >words - fn() { unset foo; print $foo; } + fn() { unset foo; print value is $foo; } setopt nounset print option unset unset by setting nounset eval fn @@ -1008,9 +1008,32 @@ 0:UNSET option >option unset unset by setting nounset >option unset reset -> +>value is ?fn: foo: parameter not set + fn1() { unset foo; print value 1 is ${foo#bar}; } + fn2() { unset foo; print value 2 is ${foo%bar}; } + fn3() { unset foo; print value 3 is ${foo/bar}; } + setopt nounset + print option unset unset by setting nounset + eval fn1 + eval fn2 + eval fn3 + print option unset reset + setopt unset + fn1 + fn2 + fn3 +0:UNSET option with operators +>option unset unset by setting nounset +>option unset reset +>value 1 is +>value 2 is +>value 3 is +?fn1: foo: parameter not set +?fn2: foo: parameter not set +?fn3: foo: parameter not set + fn() { emulate -L zsh setopt warncreateglobal |