Commit 1eaa218
committed
Fix deprecated env::set_var/remove_var in tests
Wrap all env::set_var and env::remove_var calls in unsafe blocks
(deprecated as unsafe since Rust 1.81, will error on edition 2024).
Add serial_test crate and #[serial] attribute to all tests that
mutate environment variables to prevent parallel execution races.
Fix XDG_CONFIG_HOME leak between tests by unsetting it in
set_config_dir() helper.
Tests now pass reliably with multi-threaded execution.1 parent c907c3c commit 1eaa218
4 files changed
Lines changed: 170 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
0 commit comments