diff --git a/crates/weksa/src/store.rs b/crates/weksa/src/store.rs index 9c95e70..e942a66 100644 --- a/crates/weksa/src/store.rs +++ b/crates/weksa/src/store.rs @@ -490,13 +490,13 @@ pub(crate) fn normalized(text: &str) -> String { } /// The one-to-one folds `normalized` adds to NFKC and case folding, applied -/// before the case fold (U+0130 would otherwise fold to i plus a combining dot, -/// which the key keeps as a mark). +/// before the case fold. (U+0130 needs no arm: it folds to i plus a combining +/// dot, and the `dotless` loop in `normalized` drops that dot after an `i`, so +/// the key is plain `i`.) fn fold_variant(c: char) -> impl Iterator { let one = |c: char| (c, None); let (first, second) = match c { '\u{131}' => one('i'), - '\u{130}' => one('I'), // Voiced katakana wa, wi, we, wo: the hiragana (U+308F-3092) plus the // combining voiced mark, which is how NFKC spells the hiragana forms. '\u{30f7}'..='\u{30fa}' => ( diff --git a/crates/weksa/tests/mutants_b.rs b/crates/weksa/tests/mutants_b.rs index 9d932e3..89830a6 100644 --- a/crates/weksa/tests/mutants_b.rs +++ b/crates/weksa/tests/mutants_b.rs @@ -78,7 +78,7 @@ fn a_pronunciation_keeps_at_most_eight_rejected_variants() { } #[test] -fn an_ontology_entry_read_at_an_unknown_revision_is_refused_once_per_condition() { +fn an_ontology_entry_read_at_an_unknown_revision_is_refused_with_one_refusal() { let w = world(); let mut onto = OntologyStore::open(&w.dir.path().join("o2.cc")).unwrap(); let entry = OntologyEntry { @@ -292,5 +292,6 @@ fn relower_refuses_malformed_arm_and_floor_labels_before_reading_the_run() { } // Well-formed, distinct labels get past the label check (to the missing run). let o = relower("a", &["b", "c"]); - assert!(!out(&o).contains("arm and floor labels"), "{}", out(&o)); + assert!(!o.status.success()); + assert!(out(&o).contains("the root holds no run"), "{}", out(&o)); }