From e0d840185d3236513649e2b1d802864df8f3a276 Mon Sep 17 00:00:00 2001 From: jca Date: Fri, 12 Jan 2018 13:54:10 +0000 Subject: [PATCH] Add tests for [[:foo:]] character classes in globs --- regress/bin/ksh/glob.t | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/regress/bin/ksh/glob.t b/regress/bin/ksh/glob.t index 56e016b25d6..54bdf5a95b8 100644 --- a/regress/bin/ksh/glob.t +++ b/regress/bin/ksh/glob.t @@ -97,3 +97,34 @@ expected-stdout: -bc abc bbc cbc ebc --- +name: glob-charclass-1 +description: + Check POSIX character class support +file-setup: file 644 "abc" +file-setup: file 644 "1bc" +file-setup: file 644 "@bc" +file-setup: file 644 "a.c" +stdin: + echo [[:alnum:]]* + echo *[[:punct:]]c +expected-stdout: + 1bc a.c abc + a.c + +--- + +name: glob-charclass-2 +description: + Check POSIX character class support (negative match) +file-setup: file 644 "abc" +file-setup: file 644 "1bc" +file-setup: file 644 "@bc" +file-setup: file 644 "a.c" +stdin: + echo [![:alnum:]]* + echo *[![:punct:]]c +expected-stdout: + @bc + 1bc @bc abc + +--- -- 2.20.1