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 @@ -262,7 +262,11 @@ fn test_set_workspace_paths_inserts_empty_root_immediately() {
262262 let roots = db. workspace_roots ( ) . roots ( & db) . clone ( ) ;
263263 assert_eq ! ( roots. len( ) , 1 ) ;
264264 assert ! ( roots[ 0 ] . packages( & db) . is_empty( ) ) ;
265- // Path matches (canonicalized; macOS prefixes with `/private`).
266- let expected = tmp. path ( ) . canonicalize ( ) . unwrap ( ) ;
267- assert_eq ! ( roots[ 0 ] . path( & db) . to_file_path( ) . unwrap( ) , expected) ;
265+ // Path matches. Compare via the URL conversion the scheduler uses
266+ // internally, so this stays cross-platform: macOS canonicalization
267+ // resolves symlinks (`/var` -> `/private/var`), Windows adds a `\\?\`
268+ // UNC prefix, and going through `UrlId::from_file_path` on both sides
269+ // is the only round-trip that matches.
270+ let expected = UrlId :: from_file_path ( tmp. path ( ) ) . unwrap ( ) ;
271+ assert_eq ! ( roots[ 0 ] . path( & db) , & expected) ;
268272}
You can’t perform that action at this time.
0 commit comments