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

Function test_diff_run_no_changes

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

Source from the content-addressed store, hash-verified

1241 #[test]
1242 #[file_serial]
1243 fn test_diff_run_no_changes() {
1244 let _guard = DirGuard::new();
1245
1246 let temp_dir = tempfile::tempdir().unwrap();
1247 let repo_path = temp_dir.path();
1248
1249 // Initialize repository
1250 {
1251 let _repo = Repository::init(repo_path).unwrap();
1252 }
1253
1254 std::env::set_current_dir(repo_path).unwrap();
1255
1256 let diff = Diff::new();
1257 let result = diff.run();
1258
1259 // Should succeed but show no changes
1260 assert!(result.is_ok());
1261 }
1262
1263 #[test]
1264 #[file_serial]

Callers

nothing calls this directly

Calls 4

initFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected