test(mcp): compare the scratch folder by its canonical path (#965)

PathScope stores its roots canonicalised (\\?\ on Windows, /private/var on macOS), so the default-folders test now canonicalises scratch_dir() before looking it up, like the recovery folder on the line above.

The same fix came in from @Karl-VonRichter in #969, found on macOS.

Co-authored-by: Karl-VonRichter <[email protected]>
This commit is contained in:
Mateusz SychandKarl-VonRichter authored and GitHub committed 2026-10-14 01:26:51 -04:00
1 parent 7bed28752e
commit 482abb4562
1 file changed
+1 -1
+1 -1
View File
@@ -473,7 +473,7 @@ fn the_default_folders_are_the_designs_the_recovery_folder_and_the_scratch_folde
let cwd = std::fs::canonicalize(std::env::current_dir().unwrap()).unwrap();
assert!(!scope.roots().contains(&cwd), "the working folder is not a default folder: {scope:?}");
assert!(scope.roots().contains(&std::fs::canonicalize(&recovery).unwrap()), "{scope:?}");
assert!(scope.roots().contains(&crate::scratch_dir().unwrap()), "{scope:?}");
assert!(scope.roots().contains(&std::fs::canonicalize(crate::scratch_dir().unwrap()).unwrap()), "{scope:?}");
let mut session = solidcraft_engine::Session::default();
session.execute("solid.box", &json!({"length": 10, "width": 10, "height": 10})).unwrap();