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

Function test_diff_run_name_only_format

atomic-cli/src/commands/diff/tests.rs:1353–1372  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1351 #[test]
1352 #[serial]
1353 fn test_diff_run_name_only_format() {
1354 let _guard = DirGuard::new();
1355
1356 let temp_dir = tempfile::tempdir().unwrap();
1357 let repo_path = temp_dir.path();
1358
1359 // Initialize repository and add a file
1360 {
1361 let repo = Repository::init(repo_path).unwrap();
1362 std::fs::write(repo_path.join("test.txt"), "Content").unwrap();
1363 repo.add("test.txt", Default::default()).unwrap();
1364 }
1365
1366 std::env::set_current_dir(repo_path).unwrap();
1367
1368 let diff = Diff::new().with_name_only(true);
1369 let result = diff.run();
1370
1371 assert!(result.is_ok());
1372 }
1373
1374 #[test]
1375 #[serial]

Callers

nothing calls this directly

Calls 6

writeFunction · 0.85
with_name_onlyMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45
addMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected