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