MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_find_repository_root_in_current

Function test_find_repository_root_in_current

atomic-cli/src/commands/mod.rs:658–671  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

656
657 #[test]
658 fn test_find_repository_root_in_current() {
659 let temp = TempDir::new().unwrap();
660 std::fs::create_dir(temp.path().join(DOT_DIR)).unwrap();
661
662 let result = find_repository_root_from(temp.path());
663 assert!(result.is_ok());
664 // Compare canonical paths to handle macOS /private/var vs /var symlinks
665 let expected = temp
666 .path()
667 .canonicalize()
668 .unwrap_or_else(|_| temp.path().to_path_buf());
669 let actual = result.unwrap();
670 assert_eq!(actual, expected);
671 }
672
673 #[test]
674 fn test_find_repository_root_in_parent() {

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected