File tree Expand file tree Collapse file tree
crates/oak_scan/src/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,7 +263,11 @@ fn test_set_workspace_paths_inserts_empty_root_immediately() {
263263 let roots = db. workspace_roots ( ) . roots ( & db) . clone ( ) ;
264264 assert_eq ! ( roots. len( ) , 1 ) ;
265265 assert ! ( roots[ 0 ] . packages( & db) . is_empty( ) ) ;
266- // Path matches (canonicalized; macOS prefixes with `/private`).
267- let expected = tmp. path ( ) . canonicalize ( ) . unwrap ( ) ;
268- assert_eq ! ( roots[ 0 ] . path( & db) . to_file_path( ) . unwrap( ) , expected) ;
266+ // Path matches. Compare via the URL conversion the scheduler uses
267+ // internally, so this stays cross-platform: macOS canonicalization
268+ // resolves symlinks (`/var` -> `/private/var`), Windows adds a `\\?\`
269+ // UNC prefix, and going through `UrlId::from_file_path` on both sides
270+ // is the only round-trip that matches.
271+ let expected = UrlId :: from_file_path ( tmp. path ( ) ) . unwrap ( ) ;
272+ assert_eq ! ( roots[ 0 ] . path( & db) , & expected) ;
269273}
You can’t perform that action at this time.
0 commit comments