Merge pull request #2374 from storytold/perf/2218-cloud

cloud, proof and testkit: consolidate integration tests
This commit is contained in:
FredApps
2026-11-20 18:40:16 +07:00
committed by GitHub
15 changed files with 24 additions and 6 deletions
+3
View File
@@ -0,0 +1,3 @@
mod backend;
mod confinement_regressions;
mod save_path_regressions;
+4
View File
@@ -0,0 +1,4 @@
//! The crate's integration tests, linked into one test binary.
mod renders;
mod share_dialog;
+1 -1
View File
@@ -244,7 +244,7 @@ NFC/NFD lookup with original ranges, suggestions and pack hyphenation. The opt-i
dictionary gate fails when its input is missing; it never silently skips its assertions:
```sh
WORDCRAFT_DICTIONARIES=/absolute/isolated/french-dictionary cargo test -p craft-proof --test french_dictionary -- --ignored
WORDCRAFT_DICTIONARIES=/absolute/isolated/french-dictionary cargo test -p craft-proof --test it -- french_dictionary:: --ignored
```
For a reproducible real-dictionary run, use Dicollecte 7.7 from LibreOffice/dictionaries
@@ -6,7 +6,7 @@
use craft_proof::affix::{AffixDict, capitalize};
use std::fmt::Write;
#[path = "fixtures/affix_compatibility_cases.rs"]
#[path = "../fixtures/affix_compatibility_cases.rs"]
mod fixtures;
fn snapshot(case: &fixtures::Case, dict: &AffixDict) -> String {
@@ -47,7 +47,7 @@ fn snapshot(case: &fixtures::Case, dict: &AffixDict) -> String {
#[test]
fn non_french_affix_outputs_match_pre_french_baseline() {
let expected = include_str!("fixtures/affix_compatibility.expected");
let expected = include_str!("../fixtures/affix_compatibility.expected");
let mut actual = String::new();
for case in fixtures::cases() {
let dict = AffixDict::from_hunspell(&case.aff, &case.dic, &["original compatibility fixture"]).unwrap();
@@ -80,7 +80,7 @@ fn non_french_affix_outputs_match_pre_french_baseline() {
#[test]
fn legacy_compact_data_is_refused_without_reinterpreting_homonyms() {
let encoded = include_str!("fixtures/affix_compatibility.compact");
let encoded = include_str!("../fixtures/affix_compatibility.compact");
let cases = fixtures::cases();
let lines: Vec<_> = encoded.lines().collect();
assert_eq!(lines.len(), cases.len());
@@ -1,11 +1,10 @@
//! French uses ordinary Language packs and keeps each regional locale at the public API.
#![allow(clippy::unwrap_used, clippy::expect_used)]
use craft_proof::affix;
use craft_proof::{IssueKind, Options, ProofLang, check_text_with, is_correct_in_with, suggest_in};
use std::path::{Path, PathBuf};
#[path = "../src/fr/test_dict.rs"]
#[path = "../../src/fr/test_dict.rs"]
mod fixture;
struct Tools(PathBuf);
+8
View File
@@ -0,0 +1,8 @@
//! The crate's integration tests, linked into one test binary.
// The shared French dictionary fixture refers to the affix module through the crate root.
use craft_proof::affix;
mod affix_compatibility;
mod french_dictionary;
mod french_packs;
+4
View File
@@ -0,0 +1,4 @@
//! The crate's integration tests, linked into one test binary.
mod guards;
mod source_limits;