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

Function test_diff_run_stat_format

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

Source from the content-addressed store, hash-verified

1374 #[test]
1375 #[serial]
1376 fn test_diff_run_stat_format() {
1377 let _guard = DirGuard::new();
1378
1379 let temp_dir = tempfile::tempdir().unwrap();
1380 let repo_path = temp_dir.path();
1381
1382 // Initialize repository and add a file
1383 {
1384 let repo = Repository::init(repo_path).unwrap();
1385 std::fs::write(repo_path.join("test.txt"), "Line 1\nLine 2\nLine 3\n").unwrap();
1386 repo.add("test.txt", Default::default()).unwrap();
1387 }
1388
1389 std::env::set_current_dir(repo_path).unwrap();
1390
1391 let diff = Diff::new().with_stat(true);
1392 let result = diff.run();
1393
1394 assert!(result.is_ok());
1395 }
1396
1397 #[test]
1398 #[serial]

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected