Delete dead U+0130 arm in fold_variant #91

Merged
weksa merged 2 commits from weksa-lowering/del-fold-variant-u0130 into main 2026-11-14 03:15:24 +00:00
2 changed files with 6 additions and 5 deletions

View file

@ -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<Item = char> {
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}' => (

View file

@ -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));
}