|
58 | 58 | # Proper unicode handling |
59 | 59 | @test match(r"∀∀", "∀x∀∀∀").match == "∀∀" |
60 | 60 |
|
61 | | -@test_throws ErrorException match(r"a", "\xe2\x88") # 1 byte missing at end |
62 | | -@test_throws ErrorException match(r"a", "\xe2\x08\x80") # byte 2 top bits not 0x80 |
63 | | -@test_throws ErrorException match(r"a", "\xf8\x89\x89\x80\x80") # 5-byte character is not allowed (RFC 3629) |
64 | | -@test_throws ErrorException match(r"a", "\xf4\x9f\xbf\xbf") # code points greater than 0x10ffff are not defined |
65 | | -@test_throws ErrorException match(r"a", "\Udfff") # code points 0xd800-0xdfff are not defined |
66 | | -@test_throws ErrorException match(r"a", "\xc0\x80") # overlong 2-byte sequence |
67 | | -@test_throws ErrorException match(r"a", "\xff") # illegal byte (0xfe or 0xff) |
68 | | - |
69 | | -@test_throws ErrorException Regex("\xe2\x88") # 1 byte missing at end |
70 | | -@test_throws ErrorException Regex("\xe2\x08\x80") # byte 2 top bits not 0x80 |
71 | | -@test_throws ErrorException Regex("\xf8\x89\x89\x80\x80") # 5-byte character is not allowed (RFC 3629) |
72 | | -@test_throws ErrorException Regex("\xf4\x9f\xbf\xbf") # code points greater than 0x10ffff are not defined |
73 | | -@test_throws ErrorException Regex("\Udfff") # code points 0xd800-0xdfff are not defined |
74 | | -@test_throws ErrorException Regex("\xc0\x80") # overlong 2-byte sequence |
75 | | -@test_throws ErrorException Regex("\xff") # illegal byte (0xfe or 0xff) |
76 | | - |
77 | 61 | # 'a' flag to disable UCP |
78 | 62 | @test match(r"\w+", "Düsseldorf").match == "Düsseldorf" |
79 | 63 | @test match(r"\w+"a, "Düsseldorf").match == "D" |
0 commit comments