|
@@ -63,6 +63,7 @@ func TestCasefoldChannel(t *testing.T) {
|
63
|
63
|
"", "#*starpower", "# NASA", "#interro?", "OOF#", "foo",
|
64
|
64
|
// bidi violation mixing latin and hebrew characters:
|
65
|
65
|
"#shalomעליכם",
|
|
66
|
+ "#tab\tcharacter", "#\t", "#carriage\rreturn",
|
66
|
67
|
} {
|
67
|
68
|
testCases = append(testCases, channelTest{channel: errCase, err: true})
|
68
|
69
|
}
|
|
@@ -237,3 +238,14 @@ func TestFoldPermissive(t *testing.T) {
|
237
|
238
|
tester("dolph🐬n", "DOLPH🐬n", true)
|
238
|
239
|
tester("dolph🐬n", "dolph💻n", false)
|
239
|
240
|
}
|
|
241
|
+
|
|
242
|
+func TestFoldPermissiveInvalid(t *testing.T) {
|
|
243
|
+ _, err := foldPermissive("a\tb")
|
|
244
|
+ if err == nil {
|
|
245
|
+ t.Errorf("whitespace should be invalid in identifiers")
|
|
246
|
+ }
|
|
247
|
+ _, err = foldPermissive("a\x00b")
|
|
248
|
+ if err == nil {
|
|
249
|
+ t.Errorf("the null byte should be invalid in identifiers")
|
|
250
|
+ }
|
|
251
|
+}
|