Skip to content

Commit 40613bd

Browse files
committed
temp: try to fix test on Windows
1 parent d83afea commit 40613bd

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

fixtures/nextest-tests/tests/basic.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,11 @@ fn test_cargo_env_vars() {
174174
.as_deref(),
175175
Ok("if-this-value-is-present-then-test-passed")
176176
);
177-
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
178177
let overridden_path =
179178
std::env::var("__NEXTEST_ENV_VAR_FOR_TESTING_IN_PARENT_ENV_RELATIVE_OVERRIDDEN").unwrap();
180-
let overridden_path = match overridden_path.strip_prefix(&manifest_dir) {
181-
Some(overridden_path) => overridden_path,
182-
None => panic!(
183-
"Path {overridden_path:?} should start with workspace root {:?}",
184-
manifest_dir
185-
),
186-
};
187-
assert_eq!(
179+
assert!(overridden_path.ends_with(&format!("{SEP}.cargo{SEP}if-this-value-is-present-then-test-passed", SEP = std::path::MAIN_SEPARATOR)),
180+
"Path {:?} should start end with the relative file path",
188181
overridden_path,
189-
"/.cargo/if-this-value-is-present-then-test-passed"
190182
);
191183
}
192184

0 commit comments

Comments
 (0)