diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/parse.c | 2 | ||||
-rw-r--r-- | Test/A01grammar.ztst | 15 |
3 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 8848ce237..ef4029436 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-05-18 Peter Stephenson <p.stephenson@samsung.com> + * 35184: Src/parse.c, Test/A01grammar.ztst: fix pattern parsing + after "|" in 35168. + * 35168: Completion/Unix/Command/_ant, Completion/Unix/Command/_cp, Completion/Unix/Command/_locate, Completion/Unix/Command/_make, Completion/Unix/Command/_tar, diff --git a/Src/parse.c b/Src/parse.c index c938d2dce..c48669995 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1174,8 +1174,6 @@ par_case(int *cmplx) if (!strcmp(tokstr, "esac")) break; str = dupstring(tokstr); - incasepat = 0; - incmdpos = 1; type = WC_CASE_OR; pp = ecadd(0); palts = ecadd(0); diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index 1ba0a54d7..41fb48688 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -543,6 +543,7 @@ . ./bad_syntax 126: Attempt to "." file with bad syntax. ?./bad_syntax:2: parse error near `\n' +# ` echo 'false' >dot_false . ./dot_false @@ -650,3 +651,17 @@ >Pattern matched five >Pattern matched six >Character class matched abecedinarian + + case grumph in + ( no | (grumph) ) + print 1 OK + ;; + esac + case snruf in + ( fleer | (|snr(|[au]f)) ) + print 2 OK + ;; + esac +0: case patterns within words +>1 OK +>2 OK |