File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ mod tests {
100100 assert_eq ! ( expand_path_str( "/tmp/test" ) , "/tmp/test" ) ;
101101
102102 // With one variable
103- env:: set_var ( "TEST_PATH " , "/test/path" ) ;
104- let result = expand_path_str ( "$TEST_PATH /file" ) ;
103+ env:: set_var ( "TEST_PATH_STR " , "/test/path" ) ;
104+ let result = expand_path_str ( "$TEST_PATH_STR /file" ) ;
105105 assert ! ( result. contains( "/test/path/file" ) ) ;
106- env:: remove_var ( "TEST_PATH " ) ;
106+ env:: remove_var ( "TEST_PATH_STR " ) ;
107107
108108 // With HOME variable (if available)
109109 if let Ok ( home) = env:: var ( "HOME" ) {
@@ -120,11 +120,11 @@ mod tests {
120120 PathBuf :: from( "/tmp/test" )
121121 ) ;
122122
123- // with env vars
124- env:: set_var ( "TEST_PATH " , "/test/path" ) ;
125- let result = expand_path_buf ( Path :: new ( "$TEST_PATH /file" ) ) ;
123+ // with env vars (use unique name to avoid race with parallel tests)
124+ env:: set_var ( "TEST_PATH_BUF " , "/test/path" ) ;
125+ let result = expand_path_buf ( Path :: new ( "$TEST_PATH_BUF /file" ) ) ;
126126 assert ! ( result. to_string_lossy( ) . contains( "/test/path/file" ) ) ;
127- env:: remove_var ( "TEST_PATH " ) ;
127+ env:: remove_var ( "TEST_PATH_BUF " ) ;
128128 }
129129
130130 #[ test]
You can’t perform that action at this time.
0 commit comments