|
@@ -193,7 +193,7 @@ func TestSkeleton(t *testing.T) {
|
193
|
193
|
func TestCanonicalizeMaskWildcard(t *testing.T) {
|
194
|
194
|
tester := func(input, expected string, expectedErr error) {
|
195
|
195
|
out, err := CanonicalizeMaskWildcard(input)
|
196
|
|
- if out != expected {
|
|
196
|
+ if expectedErr == nil && out != expected {
|
197
|
197
|
t.Errorf("expected %s to canonicalize to %s, instead %s", input, expected, out)
|
198
|
198
|
}
|
199
|
199
|
if err != expectedErr {
|
|
@@ -216,6 +216,10 @@ func TestCanonicalizeMaskWildcard(t *testing.T) {
|
216
|
216
|
tester("Shivaram*", "shivaram*!*@*", nil)
|
217
|
217
|
tester("*SHIVARAM*", "*shivaram*!*@*", nil)
|
218
|
218
|
tester("*SHIVARAM* ", "*shivaram*!*@*", nil)
|
|
219
|
+
|
|
220
|
+ tester(":shivaram", "", errInvalidCharacter)
|
|
221
|
+ tester("shivaram!us er@host", "", errInvalidCharacter)
|
|
222
|
+ tester("shivaram!user@ho st", "", errInvalidCharacter)
|
219
|
223
|
}
|
220
|
224
|
|
221
|
225
|
func validFoldTester(first, second string, equal bool, folder func(string) (string, error), t *testing.T) {
|