summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test-japanese-util.js24
1 files changed, 21 insertions, 3 deletions
diff --git a/test/test-japanese-util.js b/test/test-japanese-util.js
index 48dc9af7..f3b53844 100644
--- a/test/test-japanese-util.js
+++ b/test/test-japanese-util.js
@@ -33,7 +33,8 @@ function testIsCodePointKanji() {
const data = [
['力方', true],
['\u53f1\u{20b9f}', true],
- ['かたカタ々kata、。?,.?', false]
+ ['かたカタ々kata、。?,.?', false],
+ ['逸逸', true]
];
for (const [characters, expected] of data) {
@@ -65,7 +66,8 @@ function testIsCodePointJapanese() {
const data = [
['かたカタ力方々、。?', true],
['\u53f1\u{20b9f}', true],
- ['kata,.?', false]
+ ['kata,.?', false],
+ ['逸逸', true]
];
for (const [characters, expected] of data) {
@@ -109,7 +111,8 @@ function testIsStringPartiallyJapanese() {
['kata,.?', false],
['かたカタ力方々、。?invalid', true],
['\u53f1\u{20b9f}invalid', true],
- ['kata,.?かた', true]
+ ['kata,.?かた', true],
+ ['逸逸', true]
];
for (const [string, expected] of data) {
@@ -672,6 +675,21 @@ function testDistributeFurigana() {
[
{text: 'シック', reading: 'シック・ビルしょうこうぐん'}
]
+ ],
+ // Kanji distribution tests
+ [
+ ['逸らす', 'そらす'],
+ [
+ {text: '逸', reading: 'そ'},
+ {text: 'らす', reading: ''}
+ ]
+ ],
+ [
+ ['逸らす', 'そらす'],
+ [
+ {text: '逸', reading: 'そ'},
+ {text: 'らす', reading: ''}
+ ]
]
];