test(store): two setup answers compared as the system spells them (macOS)
check / check (push) Canceled after 0s
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
swaitsandClaude Fable 5.1 committed 2026-10-30 02:17:36 -06:00
1 parent ccc5d21941
commit 8f0e5f0841
1 file changed
+9 -2
+9 -2
View File
@@ -189,7 +189,11 @@ fn the_root_is_found_without_the_environment() {
fn setup_makes_a_private_root_and_its_folders() {
let home = tmp("setup");
let (root, report) = Root::setup(home.path(), None, None).unwrap();
assert_eq!(root.path(), default_root(home.path()));
// The root as the system spells it (macOS: /tmp is /private/tmp).
assert_eq!(
root.path(),
default_root(&std::fs::canonicalize(home.path()).unwrap())
);
assert!(report.created && !report.tightened && !report.recorded);
assert_eq!(mode(root.path()), 0o700);
for sub in ["books", "run", "legacy"] {
@@ -225,7 +229,10 @@ fn setup_records_a_root_chosen_elsewhere_and_forgets_it_when_back_to_default() {
let fresh = tmp("setup-xdg");
let xdg = fresh.path().join("xdg");
let (root, report) = Root::setup(fresh.path(), None, Some(&xdg)).unwrap();
assert_eq!(root.path(), xdg.join("wanderbooks"));
assert_eq!(
root.path(),
std::fs::canonicalize(&xdg).unwrap().join("wanderbooks")
);
assert!(report.recorded);
assert_eq!(
Root::find_in(fresh.path(), None).unwrap().path(),