diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4fe32df2..fb28f7d6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,7 +172,7 @@ jobs: run: rustup show - uses: Swatinem/rust-cache@v2 - run: cargo build --workspace --all-targets - - run: cargo test --workspace + - run: cargo test --workspace --no-fail-fast # Behavior gate: replays the tests/oracle/ goldens against a release build # of the engine from THIS checkout (so a PR is judged on its own source, diff --git a/crates/hook/tests/cache_root_tests.rs b/crates/hook/tests/cache_root_tests.rs index 66447dec2..090e811c0 100644 --- a/crates/hook/tests/cache_root_tests.rs +++ b/crates/hook/tests/cache_root_tests.rs @@ -113,6 +113,13 @@ fn state_relocates_and_slug_normalizes() { assert_ne!(get_cache_path("/x/my.app"), get_cache_path("/x/my-app")); } +/// The project-local cache path for `/x/app`, joined with the host's path +/// semantics (backslashes on Windows), which is what the stock behavior +/// produces. +fn stock_cache_path() -> String { + impeccable_common::jsp::join(&["/x/app", ".impeccable", "hook.cache.json"]) +} + #[test] fn root_value_normalization_and_opt_out() { let _l = ENV_LOCK.lock().unwrap(); @@ -131,11 +138,11 @@ fn root_value_normalization_and_opt_out() { // Unset or blank keeps stock project-local behavior. { let _g = EnvGuard::set(&[("IMPECCABLE_CACHE_ROOT", None)]); - assert_eq!(get_cache_path("/x/app"), "/x/app/.impeccable/hook.cache.json"); + assert_eq!(get_cache_path("/x/app"), stock_cache_path()); } { let _g = EnvGuard::set(&[("IMPECCABLE_CACHE_ROOT", Some(" "))]); - assert_eq!(get_cache_path("/x/app"), "/x/app/.impeccable/hook.cache.json"); + assert_eq!(get_cache_path("/x/app"), stock_cache_path()); } }