()
| 670 | |
| 671 | #[test] |
| 672 | fn test_find_repository_root_in_current() { |
| 673 | let temp = TempDir::new().unwrap(); |
| 674 | std::fs::create_dir(temp.path().join(DOT_DIR)).unwrap(); |
| 675 | |
| 676 | let result = find_repository_root_from(temp.path()); |
| 677 | assert!(result.is_ok()); |
| 678 | // Compare canonical paths to handle macOS /private/var vs /var symlinks |
| 679 | let expected = temp |
| 680 | .path() |
| 681 | .canonicalize() |
| 682 | .unwrap_or_else(|_| temp.path().to_path_buf()); |
| 683 | let actual = result.unwrap(); |
| 684 | assert_eq!(actual, expected); |
| 685 | } |
| 686 | |
| 687 | #[test] |
| 688 | fn test_find_repository_root_in_parent() { |
nothing calls this directly
no test coverage detected