Skip to content

Commit

Permalink
Fix Thai valid text and add Thai illegal sequences
Browse files Browse the repository at this point in the history
- Fix a invalid sequence in "valid text" `kScriptText`
- Add two illegal sequence in `kBadlyFormedThaiWords`
  • Loading branch information
bact committed May 22, 2019
1 parent bc3ea62 commit e05c5ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions unittest/normstrngs_test.cc
Expand Up @@ -76,7 +76,8 @@ const char kKorText[] = "이는 것으로";
// Hindi words containing illegal vowel sequences.
const char* kBadlyFormedHinWords[] = {"उपयोक्ताो", "नहीें", "प्रंात",
"कहीअे", "पत्रिाका", "छह्णाीस"};
const char* kBadlyFormedThaiWords[] = {"ฤิ", "กา้ํ", "กิำ"};
// Thai illegal sequences.
const char* kBadlyFormedThaiWords[] = {"ฤิ", "กา้ํ", "กิำ", "นำ้", "เเก"};

TEST(NormstrngsTest, DetectsCorrectText) {
string chars;
Expand Down Expand Up @@ -287,7 +288,7 @@ TEST(NormstrngsTest, AllScriptsRegtest) {
{"Thai",
"อ้อ! กับนัง....แม่ยอดพระกลิ่น นั่นเอง ! หรับก็ย่อมจะรู้โดยชัดเจนว่า "
"ถ้าตราบใดยังมีเรือปืนอยู่ใกล้ ๆ แล้ว ตราบนั้น "
"พระดำรินี้ ที่มีคตีท่ำกรวยหมากและธปเทียน "
"พระดำรินี้ ที่มีท่ากรวยหมากและธูปเทียน "
"อันยานมีเรือเปนต้นฃ้ามยาก ฯ เพราะว่าแม่น้ำนั่นมีน้ำใสยิ่ง แม้เพียง"},
{"Vietnamese",
"vợ đến tai mụ hung thần Xăng-tô- mê-a. Mụ vô cùng "
Expand Down

0 comments on commit e05c5ec

Please sign in to comment.