From 8eb9070d6785f423dd9bdbbb0513aa47c8a08d62 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 19 Jan 2016 09:55:46 +0000 Subject: 37678: Now possible to quote "-" in pattern range --- Test/D02glob.ztst | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'Test/D02glob.ztst') diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index f944a4fbd..89256e303 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -582,3 +582,43 @@ >1 OK >2 OK >3 OK + + [[ foo = 'f'\o"o" ]] +0:Stripping of quotes from patterns (1) + + [[ foo = 'f'('o'|'a')('o'|'b') ]] +0:Stripping of quotes from patterns (2) + + [[ fob = 'f'('o'|'a')('o'|'b') ]] +0:Stripping of quotes from patterns (3) + + [[ fab = 'f'('o'|'a')('o'|'b') ]] +0:Stripping of quotes from patterns (4) + + [[ fib != 'f'('o'|'a')('o'|'b') ]] +0:Stripping of quotes from patterns (4) + + [[ - != [a-z] ]] +0:- is a special character in ranges + + [[ - = ['a-z'] ]] +0:- is not a special character in ranges if quoted + + [[ b-1 = [a-z]-[0-9] ]] +0:- untokenized following a bracketed subexpression + + [[ b-1 = []a-z]-[]0-9] ]] +0:- "]" after "[" is normal range character and - still works + + headremove="bcdef" + print ${headremove#[a-z]} +0:active - works in pattern in parameter +>cdef + + headremove="bcdef" + print ${headremove#['a-z']} + headremove="-cdef" + print ${headremove#['a-z']} +0:quoted - works in pattern in parameter +>bcdef +>cdef -- cgit 1.4.1