File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1504,4 +1504,23 @@ public class LexerTests: ParserTestCase {
15041504 ]
15051505 )
15061506 }
1507+
1508+ func testUnicodeContainTheEdgeContinuationByte( ) {
1509+ // A continuation byte must be in the range greater than or
1510+ // equal to 0x80 and less than or equal to 0xBF
1511+
1512+ // À(0xC3 0x80), 㗀(0xE3 0x97 0x80), 🀀(0xF0 0x9F 0x80 0x80),
1513+ // ÿ(0xC3 0xBF), 俿(0xE4 0xBF 0xBF), 𐐿(0xF0 0x90 0x90 0xBF)
1514+ assertLexemes (
1515+ " À 㗀 🀀 ÿ 俿 𐐿 " ,
1516+ lexemes: [
1517+ LexemeSpec ( . identifier, text: " À " , trailing: " " ) ,
1518+ LexemeSpec ( . identifier, text: " 㗀 " , trailing: " " ) ,
1519+ LexemeSpec ( . identifier, text: " 🀀 " , trailing: " " ) ,
1520+ LexemeSpec ( . identifier, text: " ÿ " , trailing: " " ) ,
1521+ LexemeSpec ( . identifier, text: " 俿 " , trailing: " " ) ,
1522+ LexemeSpec ( . identifier, text: " 𐐿 " ) ,
1523+ ]
1524+ )
1525+ }
15071526}
You can’t perform that action at this time.
0 commit comments