mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
49269: Fix "[ ! -o ]".
This should detect "-o" as non-empty string; "-a" was alrady working. Update the test.
This commit is contained in:
parent
765bc14701
commit
daa208e907
3 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2021-08-10 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 49269: Src/parse.c, Test/C02cond.ztst: "[ ! -o ]" should
|
||||
detect "-o" as a non-empty string and return status 1. Update
|
||||
test to reflect this.
|
||||
|
||||
2021-07-30 dana <dana@dana.is>
|
||||
|
||||
* github #77: Stavros Ntentos: Completion/X/Command/_sublimetext:
|
||||
|
|
|
@ -2509,7 +2509,7 @@ par_cond_2(void)
|
|||
* In "test" compatibility mode, "! -a ..." and "! -o ..."
|
||||
* are treated as "[string] [and] ..." and "[string] [or] ...".
|
||||
*/
|
||||
if (!(n_testargs > 1 && (check_cond(*testargs, "a") ||
|
||||
if (!(n_testargs > 2 && (check_cond(*testargs, "a") ||
|
||||
check_cond(*testargs, "o"))))
|
||||
{
|
||||
condlex();
|
||||
|
|
|
@ -380,7 +380,7 @@ F:scenario if you encounter it.
|
|||
>0
|
||||
>0
|
||||
>1
|
||||
>0
|
||||
>1
|
||||
>0
|
||||
>0
|
||||
>1
|
||||
|
|
Loading…
Reference in a new issue