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

Function test_diff_short_flag

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

Source from the content-addressed store, hash-verified

1287 #[test]
1288 #[file_serial]
1289 fn test_diff_short_flag() {
1290 let _guard = DirGuard::new();
1291
1292 let temp_dir = tempfile::tempdir().unwrap();
1293 let repo_path = temp_dir.path();
1294
1295 // Initialize repository
1296 {
1297 let _repo = Repository::init(repo_path).unwrap();
1298 }
1299
1300 std::env::set_current_dir(repo_path).unwrap();
1301
1302 // Create diff with --short flag
1303 let diff = Diff {
1304 short: true,
1305 ..Default::default()
1306 };
1307
1308 // --short should set format to NameStatus
1309 assert_eq!(diff.get_format(), DiffFormat::NameStatus);
1310 }
1311
1312 #[test]
1313 #[file_serial]

Callers

nothing calls this directly

Calls 3

initFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected