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

Function fixture

atomic-cli/tests/unrecord_integration_test.rs:41–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41fn fixture() -> (TempDir, Vec<Hash>) {
42 let dir = TempDir::new().unwrap();
43 let repo = Repository::init(dir.path()).unwrap();
44 let mut hashes = Vec::new();
45 for name in ["a.txt", "b.txt", "c.txt"] {
46 fs::write(dir.path().join(name), name).unwrap();
47 repo.add(name, Default::default()).unwrap();
48 hashes.push(record(&repo, name));
49 }
50 (dir, hashes)
51}
52
53fn history(repo: &Repository) -> Vec<Hash> {
54 repo.log(HistoryOptions::default().include_inherited(true))

Calls 6

writeFunction · 0.85
recordFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45
addMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected