diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 721486dd..6e4dc58a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,22 @@ jobs: - name: Build the native runtime and run cargo test run: bash Core/Portable/test.sh + dictionary: + name: Portable dictionary (cargo test) + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + - name: Cache the dictionary crate build + uses: actions/cache@v5 + with: + path: build/dictionary-parity/cargo + key: dictionary-${{ runner.os }}-${{ hashFiles('Core/Portable/dictionary/Cargo.lock', 'rust-toolchain.toml') }} + restore-keys: dictionary-${{ runner.os }}- + # Without a Swift toolchain the script compares against the committed fixtures. + - name: Test and verify the dictionary generator port + run: bash Core/Portable/dictionary/test.sh + scripts: name: Remote runner tests runs-on: ubuntu-24.04 diff --git a/Core/Portable/dictionary/src/spelling.rs b/Core/Portable/dictionary/src/spelling.rs index 1203aba2..93a0ad74 100644 --- a/Core/Portable/dictionary/src/spelling.rs +++ b/Core/Portable/dictionary/src/spelling.rs @@ -3,7 +3,7 @@ use std::collections::{BTreeMap, BTreeSet}; pub fn spelling(dictionary: &[u8]) -> Result>> { let mut syllables = BTreeSet::new(); - read_rows(dictionary, "generated-spelling", None, |key, _| { + read_rows(dictionary, "generated-spelling", |key, _| { syllables.extend(key.reading.split(' ').map(str::to_owned)); })?; let mut schemas = BTreeMap::new(); diff --git a/Core/Tests/InkFlowEngineTestSupport/EngineRegression.swift b/Core/Tests/InkFlowEngineTestSupport/EngineRegression.swift index 8e03766c..914af13e 100644 --- a/Core/Tests/InkFlowEngineTestSupport/EngineRegression.swift +++ b/Core/Tests/InkFlowEngineTestSupport/EngineRegression.swift @@ -281,7 +281,6 @@ package enum EngineRegression { check(fields.count == 4) selectCandidate(String(fields[0]), input: fields[1].replacingOccurrences(of: " ", with: ""), engine: engine) } - selectCandidate("串行打印机", input: "chuanxingdayinji", engine: engine) selectCandidate("深度求索", input: "shenduqiusuo", engine: engine) selectCandidate("阿米诺斯", input: "aminuosi", engine: engine) selectCandidate("并发信息系统", input: "bingfaxinxixitong", engine: engine)