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:642–655  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

640
641 #[test]
642 fn test_find_repository_root_in_current() {
643 let temp = TempDir::new().unwrap();
644 std::fs::create_dir(temp.path().join(DOT_DIR)).unwrap();
645
646 let result = find_repository_root_from(temp.path());
647 assert!(result.is_ok());
648 // Compare canonical paths to handle macOS /private/var vs /var symlinks
649 let expected = temp
650 .path()
651 .canonicalize()
652 .unwrap_or_else(|_| temp.path().to_path_buf());
653 let actual = result.unwrap();
654 assert_eq!(actual, expected);
655 }
656
657 #[test]
658 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