Add failing unit test for bug.
This commit is contained in:
parent
69384fa3b0
commit
f5198a1392
26
src/lib.rs
26
src/lib.rs
|
|
@ -822,6 +822,32 @@ mod tests {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn apply_furigana_08() {
|
||||||
|
let surface = "お疲れ様";
|
||||||
|
let kana = "オツカレサマ";
|
||||||
|
let pairs = apply_furigana(
|
||||||
|
surface,
|
||||||
|
kana,
|
||||||
|
"お疲れ様",
|
||||||
|
&FnvHashSet::default(),
|
||||||
|
&FnvHashSet::default(),
|
||||||
|
&[],
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
&[
|
||||||
|
("お".into(), "".into()),
|
||||||
|
("疲".into(), "ツカ".into()),
|
||||||
|
("れ".into(), "".into()),
|
||||||
|
("様".into(), "サマ".into()),
|
||||||
|
],
|
||||||
|
&pairs[..]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn is_equivalent_kana_01() {
|
fn is_equivalent_kana_01() {
|
||||||
assert!(is_equivalent_kana('か', 'カ'));
|
assert!(is_equivalent_kana('か', 'カ'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user