From fd1dc355a5ea465c9130228d66f0be0915a1f006 Mon Sep 17 00:00:00 2001 From: FredApps Date: Thu, 19 Nov 2026 13:02:42 +0100 Subject: [PATCH 1/2] Consolidate cloud integration tests --- crates/cloud-local/tests/{ => it}/backend.rs | 0 crates/cloud-local/tests/{ => it}/confinement_regressions.rs | 0 crates/cloud-local/tests/it/main.rs | 3 +++ crates/cloud-local/tests/{ => it}/save_path_regressions.rs | 0 crates/cloud-ui/tests/it/main.rs | 4 ++++ crates/cloud-ui/tests/{ => it}/renders.rs | 0 crates/cloud-ui/tests/{ => it}/share_dialog.rs | 0 7 files changed, 7 insertions(+) rename crates/cloud-local/tests/{ => it}/backend.rs (100%) rename crates/cloud-local/tests/{ => it}/confinement_regressions.rs (100%) create mode 100644 crates/cloud-local/tests/it/main.rs rename crates/cloud-local/tests/{ => it}/save_path_regressions.rs (100%) create mode 100644 crates/cloud-ui/tests/it/main.rs rename crates/cloud-ui/tests/{ => it}/renders.rs (100%) rename crates/cloud-ui/tests/{ => it}/share_dialog.rs (100%) diff --git a/crates/cloud-local/tests/backend.rs b/crates/cloud-local/tests/it/backend.rs similarity index 100% rename from crates/cloud-local/tests/backend.rs rename to crates/cloud-local/tests/it/backend.rs diff --git a/crates/cloud-local/tests/confinement_regressions.rs b/crates/cloud-local/tests/it/confinement_regressions.rs similarity index 100% rename from crates/cloud-local/tests/confinement_regressions.rs rename to crates/cloud-local/tests/it/confinement_regressions.rs diff --git a/crates/cloud-local/tests/it/main.rs b/crates/cloud-local/tests/it/main.rs new file mode 100644 index 000000000..6b861a9dd --- /dev/null +++ b/crates/cloud-local/tests/it/main.rs @@ -0,0 +1,3 @@ +mod backend; +mod confinement_regressions; +mod save_path_regressions; diff --git a/crates/cloud-local/tests/save_path_regressions.rs b/crates/cloud-local/tests/it/save_path_regressions.rs similarity index 100% rename from crates/cloud-local/tests/save_path_regressions.rs rename to crates/cloud-local/tests/it/save_path_regressions.rs diff --git a/crates/cloud-ui/tests/it/main.rs b/crates/cloud-ui/tests/it/main.rs new file mode 100644 index 000000000..69cfaf5b0 --- /dev/null +++ b/crates/cloud-ui/tests/it/main.rs @@ -0,0 +1,4 @@ +//! The crate's integration tests, linked into one test binary. + +mod renders; +mod share_dialog; diff --git a/crates/cloud-ui/tests/renders.rs b/crates/cloud-ui/tests/it/renders.rs similarity index 100% rename from crates/cloud-ui/tests/renders.rs rename to crates/cloud-ui/tests/it/renders.rs diff --git a/crates/cloud-ui/tests/share_dialog.rs b/crates/cloud-ui/tests/it/share_dialog.rs similarity index 100% rename from crates/cloud-ui/tests/share_dialog.rs rename to crates/cloud-ui/tests/it/share_dialog.rs From 62f44de3d6b6ef6144e73ea797ce3feaf556b290 Mon Sep 17 00:00:00 2001 From: FredApps Date: Thu, 19 Nov 2026 13:07:16 +0100 Subject: [PATCH 2/2] Consolidate related support tests --- crates/proof/README.md | 2 +- crates/proof/tests/{ => it}/affix_compatibility.rs | 6 +++--- crates/proof/tests/{ => it}/french_dictionary.rs | 0 crates/proof/tests/{ => it}/french_packs.rs | 3 +-- crates/proof/tests/it/main.rs | 8 ++++++++ crates/testkit/tests/{ => it}/guards.rs | 0 crates/testkit/tests/it/main.rs | 4 ++++ crates/testkit/tests/{ => it}/source_limits.rs | 0 8 files changed, 17 insertions(+), 6 deletions(-) rename crates/proof/tests/{ => it}/affix_compatibility.rs (95%) rename crates/proof/tests/{ => it}/french_dictionary.rs (100%) rename crates/proof/tests/{ => it}/french_packs.rs (99%) create mode 100644 crates/proof/tests/it/main.rs rename crates/testkit/tests/{ => it}/guards.rs (100%) create mode 100644 crates/testkit/tests/it/main.rs rename crates/testkit/tests/{ => it}/source_limits.rs (100%) diff --git a/crates/proof/README.md b/crates/proof/README.md index 231b7b9dc..bbf39f7be 100644 --- a/crates/proof/README.md +++ b/crates/proof/README.md @@ -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 diff --git a/crates/proof/tests/affix_compatibility.rs b/crates/proof/tests/it/affix_compatibility.rs similarity index 95% rename from crates/proof/tests/affix_compatibility.rs rename to crates/proof/tests/it/affix_compatibility.rs index 72b4d3041..23e746e17 100644 --- a/crates/proof/tests/affix_compatibility.rs +++ b/crates/proof/tests/it/affix_compatibility.rs @@ -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()); diff --git a/crates/proof/tests/french_dictionary.rs b/crates/proof/tests/it/french_dictionary.rs similarity index 100% rename from crates/proof/tests/french_dictionary.rs rename to crates/proof/tests/it/french_dictionary.rs diff --git a/crates/proof/tests/french_packs.rs b/crates/proof/tests/it/french_packs.rs similarity index 99% rename from crates/proof/tests/french_packs.rs rename to crates/proof/tests/it/french_packs.rs index 64ad46748..b17084f69 100644 --- a/crates/proof/tests/french_packs.rs +++ b/crates/proof/tests/it/french_packs.rs @@ -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); diff --git a/crates/proof/tests/it/main.rs b/crates/proof/tests/it/main.rs new file mode 100644 index 000000000..166d3fc29 --- /dev/null +++ b/crates/proof/tests/it/main.rs @@ -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; diff --git a/crates/testkit/tests/guards.rs b/crates/testkit/tests/it/guards.rs similarity index 100% rename from crates/testkit/tests/guards.rs rename to crates/testkit/tests/it/guards.rs diff --git a/crates/testkit/tests/it/main.rs b/crates/testkit/tests/it/main.rs new file mode 100644 index 000000000..f686c5c39 --- /dev/null +++ b/crates/testkit/tests/it/main.rs @@ -0,0 +1,4 @@ +//! The crate's integration tests, linked into one test binary. + +mod guards; +mod source_limits; diff --git a/crates/testkit/tests/source_limits.rs b/crates/testkit/tests/it/source_limits.rs similarity index 100% rename from crates/testkit/tests/source_limits.rs rename to crates/testkit/tests/it/source_limits.rs