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

Function test_find_repository_root_in_sandbox

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

Source from the content-addressed store, hash-verified

818
819 #[test]
820 fn test_find_repository_root_in_sandbox() {
821 let temp = TempDir::new().unwrap();
822 std::fs::write(temp.path().join(SANDBOX_POINTER), "pointer").unwrap();
823 let subdir = temp.path().join("subdir");
824 std::fs::create_dir(&subdir).unwrap();
825
826 let root = find_repository_root_from(&subdir).unwrap();
827 assert_eq!(root, temp.path().canonicalize().unwrap());
828 }
829
830 // -------------------------------------------------------------------------
831 // Hash Formatting Tests

Callers

nothing calls this directly

Calls 4

writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected