File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
crates/pet-env-var-path/src Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -163,4 +163,26 @@ mod tests {
163163 vec![ normalize_search_path( PathBuf :: from( "/usr/bin" ) ) ]
164164 ) ;
165165 }
166+
167+ #[ test]
168+ fn windows_apps_path_detection_is_case_insensitive_by_components ( ) {
169+ let path = PathBuf :: from ( if cfg ! ( windows) {
170+ r"C:\Users\User\appdata\LOCAL\microsoft\WINDOWSAPPS"
171+ } else {
172+ "/Users/user/appdata/LOCAL/microsoft/WINDOWSAPPS"
173+ } ) ;
174+
175+ assert ! ( is_windows_apps_path( & path, None ) ) ;
176+ }
177+
178+ #[ test]
179+ fn windows_apps_path_detection_rejects_partial_component_matches ( ) {
180+ let path = PathBuf :: from ( if cfg ! ( windows) {
181+ r"C:\Users\User\AppDataBackup\Local\Microsoft\WindowsApps"
182+ } else {
183+ "/Users/user/AppDataBackup/Local/Microsoft/WindowsApps"
184+ } ) ;
185+
186+ assert ! ( !is_windows_apps_path( & path, None ) ) ;
187+ }
166188}
You can’t perform that action at this time.
0 commit comments