mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 10:07:28 +00:00
tests: check that workspace's repo path match canonicalized source path
Hopefully this will fix the failing test on Windows.
This commit is contained in:
parent
f6628923dc
commit
62f541e8cd
1 changed files with 8 additions and 2 deletions
|
@ -72,12 +72,18 @@ fn test_init_additional_workspace(use_git: bool) {
|
||||||
vec![repo.store().root_commit_id().clone()]
|
vec![repo.store().root_commit_id().clone()]
|
||||||
);
|
);
|
||||||
assert_eq!(ws2.workspace_id(), ws2_id);
|
assert_eq!(ws2.workspace_id(), ws2_id);
|
||||||
assert_eq!(ws2.repo_path(), workspace.repo_path());
|
assert_eq!(
|
||||||
|
*ws2.repo_path(),
|
||||||
|
std::fs::canonicalize(workspace.repo_path()).unwrap()
|
||||||
|
);
|
||||||
assert_eq!(*ws2.workspace_root(), ws2_root);
|
assert_eq!(*ws2.workspace_root(), ws2_root);
|
||||||
let same_workspace = Workspace::load(&settings, ws2_root);
|
let same_workspace = Workspace::load(&settings, ws2_root);
|
||||||
assert!(same_workspace.is_ok());
|
assert!(same_workspace.is_ok());
|
||||||
let same_workspace = same_workspace.unwrap();
|
let same_workspace = same_workspace.unwrap();
|
||||||
assert_eq!(same_workspace.workspace_id(), ws2_id);
|
assert_eq!(same_workspace.workspace_id(), ws2_id);
|
||||||
assert_eq!(same_workspace.repo_path(), workspace.repo_path());
|
assert_eq!(
|
||||||
|
*same_workspace.repo_path(),
|
||||||
|
std::fs::canonicalize(workspace.repo_path()).unwrap()
|
||||||
|
);
|
||||||
assert_eq!(same_workspace.workspace_root(), ws2.workspace_root());
|
assert_eq!(same_workspace.workspace_root(), ws2.workspace_root());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue