()
| 651 | |
| 652 | #[test] |
| 653 | fn test_find_repository_root_in_current() { |
| 654 | let temp = TempDir::new().unwrap(); |
| 655 | std::fs::create_dir(temp.path().join(DOT_DIR)).unwrap(); |
| 656 | |
| 657 | let result = find_repository_root_from(temp.path()); |
| 658 | assert!(result.is_ok()); |
| 659 | // Compare canonical paths to handle macOS /private/var vs /var symlinks |
| 660 | let expected = temp |
| 661 | .path() |
| 662 | .canonicalize() |
| 663 | .unwrap_or_else(|_| temp.path().to_path_buf()); |
| 664 | let actual = result.unwrap(); |
| 665 | assert_eq!(actual, expected); |
| 666 | } |
| 667 | |
| 668 | #[test] |
| 669 | fn test_find_repository_root_in_parent() { |
nothing calls this directly
no test coverage detected