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

Source from the content-addressed store, hash-verified

1113 #[test]
1114 #[serial]
1115 fn test_diff_run_name_only_format() {
1116 let _guard = DirGuard::new();
1117
1118 let temp_dir = tempfile::tempdir().unwrap();
1119 let repo_path = temp_dir.path();
1120
1121 // Initialize repository and add a file
1122 {
1123 let repo = Repository::init(repo_path).unwrap();
1124 std::fs::write(repo_path.join("test.txt"), "Content").unwrap();
1125 repo.add("test.txt", Default::default()).unwrap();
1126 }
1127
1128 std::env::set_current_dir(repo_path).unwrap();
1129
1130 let diff = Diff::new().with_name_only(true);
1131 let result = diff.run();
1132
1133 assert!(result.is_ok());
1134 }
1135
1136 #[test]
1137 #[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