File tree 1 file changed +2
-10
lines changed
fixtures/nextest-tests/tests
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -174,19 +174,11 @@ fn test_cargo_env_vars() {
174
174
. as_deref( ) ,
175
175
Ok ( "if-this-value-is-present-then-test-passed" )
176
176
) ;
177
- let manifest_dir = std:: env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ;
178
177
let overridden_path =
179
178
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" ,
188
181
overridden_path,
189
- "/.cargo/if-this-value-is-present-then-test-passed"
190
182
) ;
191
183
}
192
184
You can’t perform that action at this time.
0 commit comments