aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/unit1307.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unit1307.c')
-rw-r--r--tests/unit/unit1307.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/unit/unit1307.c b/tests/unit/unit1307.c
index eff5edebc..5aa23d0dc 100644
--- a/tests/unit/unit1307.c
+++ b/tests/unit/unit1307.c
@@ -36,8 +36,8 @@ struct testcase {
static const struct testcase tests[] = {
/* brackets syntax */
{ "\\[", "[", MATCH },
- { "[", "[", RE_ERR },
- { "[]", "[]", RE_ERR },
+ { "[", "[", MATCH },
+ { "[]", "[]", MATCH },
{ "[][]", "[", MATCH },
{ "[][]", "]", MATCH },
{ "[[]", "[", MATCH },
@@ -49,6 +49,8 @@ static const struct testcase tests[] = {
{ "[][[[]", "[", MATCH },
{ "[[]", "]", NOMATCH },
+ { "[a@]", "a", MATCH },
+
{ "[a-z]", "a", MATCH },
{ "[a-z]", "A", NOMATCH },
{ "?[a-z]", "?Z", NOMATCH },
@@ -77,6 +79,7 @@ static const struct testcase tests[] = {
{ "[][?*-]", "*", MATCH },
{ "[][?*-]", "-", MATCH },
{ "[]?*-]", "-", MATCH },
+ { "[\xFF]", "\xFF", MATCH },
{ "?/b/c", "a/b/c", MATCH },
{ "^_{}~", "^_{}~", MATCH },
{ "!#%+,-./01234567889", "!#%+,-./01234567889", MATCH },
@@ -98,7 +101,9 @@ static const struct testcase tests[] = {
{ "*[^a].t?t", "ba.txt", NOMATCH },
{ "*[^a].t?t", "ab.txt", MATCH },
{ "*[^a]", "", NOMATCH },
- { "[!ΓΏ]", "", NOMATCH },
+ { "[!\xFF]", "", NOMATCH },
+ { "[!\xFF]", "\xFF", NOMATCH },
+ { "[!\xFF]", "a", MATCH },
{ "[!?*[]", "?", NOMATCH },
{ "[!!]", "!", NOMATCH },
{ "[!!]", "x", MATCH },