From 8e2d4c2cf77125588549194677a2688a547c1b9e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 20 Nov 2013 17:35:57 +0000 Subject: 32030: need to revert empty glob qualifier change. It failed on an empty expansion that (N) was supposed to remove. Add test for this case. --- ChangeLog | 5 +++++ Src/glob.c | 2 +- Test/D02glob.ztst | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0025d0fd7..be96b6312 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-20 Peter Stephenson + + * 32030: revert 31995 as it caused (N) to fail on an empty + failed glob. Add test for this case. + 2013-11-19 Barton E. Schaefer * 32023: Src/utils.c: better interrupt handling at RM_STAR_WAIT diff --git a/Src/glob.c b/Src/glob.c index 385b9e681..e0d0cf68e 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -1171,7 +1171,7 @@ zglob(LinkList list, LinkNode np, int nountok) break; } } - if (*s != Inpar || s == str) + if (*s != Inpar) break; if (isset(EXTENDEDGLOB) && !zpc_disables[ZPC_HASH] && s[1] == Pound) { if (s[2] == 'q') { diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index d6ab73304..81b002120 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -491,3 +491,11 @@ >@(scrimf), @(scrimf): 0 >'(' '*' '[' '^' '@(' >Nothing should be disabled. + + ( + setopt nomatch + x=( '' ) + print $^x(N) + ) +0:No error with empty null glob with (N). +> -- cgit 1.4.1