Config: ignore an empty VICTORY_TEST_TITLES #341

Manually merged
github merged 1 commit from gh-pr/341/head into gh-pr/341/base 2026-11-26 03:59:55 +00:00
Owner

@⁠enzoduarte1 on GitHub · 2026-11-24 02:24 UTC · original
enzoduarte1:config/empty-test-titles-env → main · +25 −2 · 1 files · 1 commits · merged 2026-11-24 08:01 UTC

What

Config::resolve treats every empty path environment variable as unset (VICTORY_GAME_DIR, VICTORY_CACHE_DIR, VICTORY_DATA_DIR), but an empty VICTORY_TEST_TITLES silently replaced the paths from victory.toml with an empty list. A shell that exports the variable without a value therefore disabled all configured test titles.

The match now requires a non-empty value, matching env_path; non-empty values still go through split_paths. Two tests cover the empty-value case and the existing separator behaviour.

Tested

  • Windows 11, Rust 1.98.1, x86_64-pc-windows-gnu (this machine has no MSVC linker).
  • cargo test -p victory-core: 10 passed, 0 failed.
  • cargo test --workspace --exclude victory-loader: all suites passed.
  • cargo clippy -p victory-core --all-targets -- -D warnings: clean.
  • rustfmt --edition 2024 --check crates/victory-core/src/config.rs: clean.
  • cargo xtask policy: 151 files ok. No game files or data taken from them were added.
  • Not tested: cargo test -p victory-loader --test load_probe. The fixture passes MSVC's /DELAYLOAD link flag, which MinGW's linker rejects here; I reproduced the same failure on unmodified main. cargo fmt --all --check and workspace-wide clippy also report pre-existing diffs and warnings on unmodified main with this toolchain, so I checked only the changed file and crate.

Checklist

  • cargo fmt, cargo clippy --workspace --all-targets and cargo test --workspace pass — see the toolchain limitation above; the changed crate is clean.
  • cargo xtask policy passes. The change adds no game files or data taken from them (docs/asset-policy.md).
  • If an AI tool wrote part of this change, the description says so: an AI tool assisted with the code and tests; I reviewed and ran them.
**@⁠enzoduarte1** on GitHub · 2026-11-24 02:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/341) `enzoduarte1:config/empty-test-titles-env` → `main` · +25 −2 · 1 files · 1 commits · merged 2026-11-24 08:01 UTC ## What `Config::resolve` treats every empty path environment variable as unset (`VICTORY_GAME_DIR`, `VICTORY_CACHE_DIR`, `VICTORY_DATA_DIR`), but an empty `VICTORY_TEST_TITLES` silently replaced the paths from `victory.toml` with an empty list. A shell that exports the variable without a value therefore disabled all configured test titles. The match now requires a non-empty value, matching `env_path`; non-empty values still go through `split_paths`. Two tests cover the empty-value case and the existing separator behaviour. ## Tested - Windows 11, Rust 1.98.1, `x86_64-pc-windows-gnu` (this machine has no MSVC linker). - `cargo test -p victory-core`: 10 passed, 0 failed. - `cargo test --workspace --exclude victory-loader`: all suites passed. - `cargo clippy -p victory-core --all-targets -- -D warnings`: clean. - `rustfmt --edition 2024 --check crates/victory-core/src/config.rs`: clean. - `cargo xtask policy`: 151 files ok. No game files or data taken from them were added. - Not tested: `cargo test -p victory-loader --test load_probe`. The fixture passes MSVC's `/DELAYLOAD` link flag, which MinGW's linker rejects here; I reproduced the same failure on unmodified `main`. `cargo fmt --all --check` and workspace-wide clippy also report pre-existing diffs and warnings on unmodified `main` with this toolchain, so I checked only the changed file and crate. ## Checklist - [ ] `cargo fmt`, `cargo clippy --workspace --all-targets` and `cargo test --workspace` pass — see the toolchain limitation above; the changed crate is clean. - [x] `cargo xtask policy` passes. The change adds no game files or data taken from them (`docs/asset-policy.md`). - [x] If an AI tool wrote part of this change, the description says so: an AI tool assisted with the code and tests; I reviewed and ran them.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:53 +00:00
github manually merged commit cc63aa269f into gh-pr/341/base 2026-11-26 03:59:55 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 04:21 UTC · original

Tested PR #341 at head cc63aa269f0750b8848813c467676d3a23f188a4 (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at cc63aa269f0750b8848813c467676d3a23f188a4.

  • cargo test --locked -p victory-core test_titles_env_ — passed (ok. 2 passed; 0 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.00s ); cases: config::tests::empty_test_titles_env_is_ignored, config::tests::test_titles_env_splits_paths.

Behavior covered: Checks an empty VICTORY_TEST_TITLES setting is ignored and non-empty path lists still split correctly.
Code: crates/victory-core/src/config.rs

**@⁠jeremygold02** on GitHub · 2026-11-24 04:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/341#issuecomment-7121950819) Tested PR #341 at head `cc63aa269f0750b8848813c467676d3a23f188a4` (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at `cc63aa269f0750b8848813c467676d3a23f188a4`. - `cargo test --locked -p victory-core test_titles_env_` — passed (ok. 2 passed; 0 failed; 0 ignored; 0 measured; 8 filtered out; finished in 0.00s ); cases: config::tests::empty_test_titles_env_is_ignored, config::tests::test_titles_env_splits_paths. Behavior covered: Checks an empty VICTORY_TEST_TITLES setting is ignored and non-empty path lists still split correctly. Code: [crates/victory-core/src/config.rs](https://github.com/Marvisak/VIctory/blob/cc63aa269f0750b8848813c467676d3a23f188a4/crates/victory-core/src/config.rs)
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!341
No description provided.