You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"match a string with a *", "match a string *", true},
66
-
{"match a string with a * at the beginning", "* at the beginning", true},
67
-
{"match a string with two *", "match * with *", true},
68
-
{"do not match a string with extra and a *", "do not match a string * with more", false},
66
+
{"match a string with a *", "match a string *", wildcard.FLAG_NONE, true},
67
+
{"match a string with a * at the beginning", "* at the beginning", wildcard.FLAG_NONE, true},
68
+
{"match a string with two *", "match * with *", wildcard.FLAG_NONE, true},
69
+
{"do not match a string with extra and a *", "do not match a string * with more", wildcard.FLAG_NONE, false},
69
70
70
-
{"match a string with a ?", "match ? string with a ?", true},
71
-
{"match a string with a ? at the beginning", "?atch a string with a ? at the beginning", true},
72
-
{"match a string with two ?", "match a string with two ??", true},
73
-
{"match a optional char with a ?", "match a optional? char with a ?", true},
74
-
{"match a optional char with a ?", "match a optional? char with a ?", true},
75
-
{"do not match a string with extra and a ?", "do not match ? string with extra and a ? like this", false},
71
+
{"match a string with a ?", "match ? string with a ?", wildcard.FLAG_NONE, true},
72
+
{"match a string with a ? at the beginning", "?atch a string with a ? at the beginning", wildcard.FLAG_NONE, true},
73
+
{"match a string with two ?", "match a string with two ??", wildcard.FLAG_NONE, true},
74
+
{"match a optional char with a ?", "match a optional? char with a ?", wildcard.FLAG_NONE, true},
75
+
{"match a optional char with a ?", "match a optional? char with a ?", wildcard.FLAG_NONE, true},
76
+
{"do not match a string with extra and a ?", "do not match ? string with extra and a ? like this", wildcard.FLAG_NONE, false},
76
77
77
-
{"match a string with a .", "match . string with a .", true},
78
-
{"match a string with a . at the beginning", ".atch a string with a . at the beginning", true},
79
-
{"match a string with two .", "match a ..ring with two .", true},
80
-
{"do not match a string with extra .", "do not match a string with extra ..", false},
78
+
{"match a string with a .", "match . string with a .", wildcard.FLAG_NONE, true},
79
+
{"match a string with a . at the beginning", ".atch a string with a . at the beginning", wildcard.FLAG_NONE, true},
80
+
{"match a string with two .", "match a ..ring with two .", wildcard.FLAG_NONE, true},
81
+
{"do not match a string with extra .", "do not match a string with extra ..", wildcard.FLAG_NONE, false},
81
82
82
-
{"A big brown fox jumps over the lazy dog, with all there wildcards friends", ". big?brown fox jumps over * wildcard. friend??", true},
83
-
{"A big brown fox fails to jump over the lazy dog, with all there wildcards friends", ". big?brown fox jumps over * wildcard. friend??", false},
83
+
{"A big brown fox jumps over the lazy dog, with all there wildcards friends", ". big?brown fox jumps over * wildcard. friend??", wildcard.FLAG_NONE, true},
84
+
{"A big brown fox fails to jump over the lazy dog, with all there wildcards friends", ". big?brown fox jumps over * wildcard. friend??", wildcard.FLAG_NONE, false},
85
+
86
+
{"This IS a StrinG witH soMMe UppeRCase FriendS", "thIs is A stRINg wITh sOMmE uPpERcAse fRiENds", wildcard.FLAG_CASEFOLD, true},
84
87
}
85
88
86
89
fori, c:=rangecases {
87
-
result:=wildcard.Match(c.pattern, c.s)
90
+
result:=wildcard.Match(c.pattern, c.s, c.flag)
88
91
ifc.result!=result {
89
92
t.Errorf("Test %d: Expected `%v`, found `%v`; With Pattern: `%s` and String: `%s`", i+1, c.result, result, c.pattern, c.s)
0 commit comments