fix(#710): diff --output-format json adds missing action:diff and working_directory fields to both ok and error branches

This commit is contained in:
YeonGyu-Kim
2026-05-26 02:07:46 +09:00
parent 8f8eb41e0f
commit f8a901c2a5
3 changed files with 18 additions and 0 deletions

View File

@@ -1114,6 +1114,18 @@ fn diff_json_has_status_and_result_field_702() {
parsed.get("result").is_some(),
"diff JSON must have result field"
);
// #710: diff JSON must have action:diff and working_directory
assert_eq!(
parsed["action"], "diff",
"diff JSON must have action:diff (#710)"
);
assert!(
parsed
.get("working_directory")
.and_then(|v| v.as_str())
.is_some(),
"diff JSON must have working_directory field (#710)"
);
}
#[test]