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

Source from the content-addressed store, hash-verified

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