From 4f7d4ba040831c9505fe05534865bee180d4b25e Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 22 Aug 2019 15:55:10 +0800 Subject: tests: add test-break test case for Thai language Thai language requires word dictionary from libthai project for word/sentence breaks. Adding this test case to check the results of sentence breaks. --- tests/breaks/four.break | 2 ++ tests/breaks/four.expected | 5 +++++ tests/meson.build | 1 + 3 files changed, 8 insertions(+) create mode 100644 tests/breaks/four.break create mode 100644 tests/breaks/four.expected diff --git a/tests/breaks/four.break b/tests/breaks/four.break new file mode 100644 index 00000000..56c151e0 --- /dev/null +++ b/tests/breaks/four.break @@ -0,0 +1,2 @@ +# For Thai language. +ภาษาไทย หรือ ภาษาไทยกลาง เป็นภาษาราชการและภาษาประจำชาติของประเทศไทย ภาษาไทยเป็นภาษาในกลุ่มภาษาไทซึ่งเป็นกลุ่มย่อยของตระกูลภาษาขร้า-ไท สันนิษฐานว่า ภาษาในตระกูลนี้มีถิ่นกำเนิดจากทางตอนใต้ของประเทศจีน และนักภาษาศาสตร์บางส่วนเสนอว่า ภาษาไทยน่าจะมีความเชื่อมโยงกับตระกูลภาษาออสโตร-เอเชียติก ตระกูลภาษาออสโตรนีเซียน และตระกูลภาษาจีน-ทิเบต diff --git a/tests/breaks/four.expected b/tests/breaks/four.expected new file mode 100644 index 00000000..aca58dce --- /dev/null +++ b/tests/breaks/four.expected @@ -0,0 +1,5 @@ +Text: ภ า ษ า ไ ท ย [ ] ห รื อ [ ] ภ า ษ า ไ ท ย ก ล า ง [ ] เ ป็ น ภ า ษ า ร า ช ก า ร แ ล ะ ภ า ษ า ป ร ะ จ ำ ช า ติ ข อ ง ป ร ะ เ ท ศ ไ ท ย [ ] ภ า ษ า ไ ท ย เ ป็ น ภ า ษ า ใ น ก ลุ่ ม ภ า ษ า ไ ท ซึ่ ง เ ป็ น ก ลุ่ ม ย่ อ ย ข อ ง ต ร ะ กู ล ภ า ษ า ข ร้ า - ไ ท [ ] สั น นิ ษ ฐ า น ว่ า [ ] ภ า ษ า ใ น ต ร ะ กู ล นี้ มี ถิ่ น ก ำ เ นิ ด จ า ก ท า ง ต อ น ใ ต้ ข อ ง ป ร ะ เ ท ศ จี น [ ] แ ล ะ นั ก ภ า ษ า ศ า ส ต ร์ บ า ง ส่ ว น เ ส น อ ว่ า [ ] ภ า ษ า ไ ท ย น่ า จ ะ มี ค ว า ม เ ชื่ อ ม โ ย ง กั บ ต ร ะ กู ล ภ า ษ า อ อ ส โ ต ร - เ อ เ ชี ย ติ ก [ ] ต ร ะ กู ล ภ า ษ า อ อ ส โ ต ร นี เ ซี ย น [ ] แ ล ะ ต ร ะ กู ล ภ า ษ า จี น - ทิ เ บ ต [0x0a] +Breaks: c c c c lc c c c lc c c c lc c c c lc c c lc c c c c lc c c lc c c c lc c c c c c lc c c lc c c c lc c c c c lc c c lc c c lc c c c c c lc c c c lc c c c lc c c lc c c lc c c c lc c lc c c lc c c c lc c lc c lc c c lc c c lc c c lc c c lc c c c c lc c c c lc c c c lc c c lc c c c c c c lc c c lc c c c lc c lc c c c c lc lc lc c lc c c c c lc c c lc c c lc c c lc c lc c c lc c c c c c lc c c lc c c lc c lc c c c c c c c c lc c c lc c c lc c c c lc c c lc c c c lc c c lc c lc c lc lc c c c lc c c c lc c c lc c lc c c c c lc c c c lc c lc c c c c lc c c c c lc c c lc c c c c lc c c c lc c lc c c c c c c c c c lc c c lc c c c c lc c c c lc c c lc c c c c c +Whitespace: x x x x x x x x x x w w +Words: bs b b b bse b b be bse b b be bse b b b bse b b bse b b b be bse b b bse b b b bse b b b b b bse b b bse b b b bse b b b b bse b b bse b b bse b b b b b bse b b be bse b b b bse b b bse b b bse b b b bse b bse b b bse b b b bse b bse b bse b b bse b b bse b b bse b b bse b b b b bse b b b bse b b be bse b be bse b b b b b b bse b be bse b b b bse b bse b b b b bse bse bse b bse b b b b bse b b bse b b bse b b bse b bse b b bse b b b b b bse b be bse b b bse b bse b b b b b b b b bse b b bse b b bse b b b bse b be bse b b b bse b b bse b bse b bse bse b b b bse b b b bse b b bse b bse b b b b bse b b b bse b bse b b b be bse b b b b bse b be bse b b b b bse b b b bse b bse b b b b b b b b be bse b b bse b b b b bse b b b bse b be bse b b b be b +Sentences: bs e b diff --git a/tests/meson.build b/tests/meson.build index aa4b0c42..4c22c12c 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -89,6 +89,7 @@ test_breaks_data = [ 'breaks/one', 'breaks/two', 'breaks/three', + 'breaks/four', ] test_items_data = [ -- cgit v1.2.1 From 252e6ba6d99327ef7aa850d43a1d84fafdd1573a Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Fri, 23 Aug 2019 15:29:34 +0800 Subject: tests: add some packages to build requirement in gitlab-ci The four test case of test-break requires libthai-devel and thai-scalable-waree-fonts package. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d71be210..3758c576 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,10 +17,12 @@ gnome-runtime-linux: harfbuzz-devel \ fribidi-devel \ cairo-devel \ + libthai-devel \ gobject-introspection-devel \ cairo-gobject-devel \ abattis-cantarell-fonts \ google-droid-sans-fonts \ + thai-scalable-waree-fonts \ desktop-file-utils script: - meson _build -- cgit v1.2.1