()
| 772 | |
| 773 | #[test] |
| 774 | fn test_find_repository_root_in_current() { |
| 775 | let temp = TempDir::new().unwrap(); |
| 776 | let _repo = Repository::init(temp.path()).unwrap(); |
| 777 | |
| 778 | let result = find_repository_root_from(temp.path()); |
| 779 | assert!(result.is_ok()); |
| 780 | // Compare canonical paths to handle macOS /private/var vs /var symlinks |
| 781 | let expected = temp |
| 782 | .path() |
| 783 | .canonicalize() |
| 784 | .unwrap_or_else(|_| temp.path().to_path_buf()); |
| 785 | let actual = result.unwrap(); |
| 786 | assert_eq!(actual, expected); |
| 787 | } |
| 788 | |
| 789 | #[test] |
| 790 | fn test_find_repository_root_in_parent() { |
nothing calls this directly
no test coverage detected