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

Source from the content-addressed store, hash-verified

1136 #[test]
1137 #[serial]
1138 fn test_diff_run_stat_format() {
1139 let _guard = DirGuard::new();
1140
1141 let temp_dir = tempfile::tempdir().unwrap();
1142 let repo_path = temp_dir.path();
1143
1144 // Initialize repository and add a file
1145 {
1146 let repo = Repository::init(repo_path).unwrap();
1147 std::fs::write(repo_path.join("test.txt"), "Line 1\nLine 2\nLine 3\n").unwrap();
1148 repo.add("test.txt", Default::default()).unwrap();
1149 }
1150
1151 std::env::set_current_dir(repo_path).unwrap();
1152
1153 let diff = Diff::new().with_stat(true);
1154 let result = diff.run();
1155
1156 assert!(result.is_ok());
1157 }
1158
1159 #[test]
1160 #[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