Compare value.

This commit is contained in:
Tom Alexander
2023-10-05 03:58:42 -04:00
parent 34a0858473
commit 18ad80e018
3 changed files with 51 additions and 18 deletions

View File

@@ -2273,8 +2273,6 @@ fn compare_fixed_width_area<'b, 's>(
let mut this_status = DiffStatus::Good;
let mut message = None;
// TODO: Compare :value
// TODO: Compare :caption
// Compare name
let name = get_property_quoted_string(emacs, ":name")?;
@@ -2286,6 +2284,18 @@ fn compare_fixed_width_area<'b, 's>(
));
}
// Compare value
let value = get_property_quoted_string(emacs, ":value")?
.ok_or("Fixed width area should have a value.")?;
let rust_value = rust.get_value();
if value != rust_value {
this_status = DiffStatus::Bad;
message = Some(format!(
"Value mismatch (emacs != rust) {:?} != {:?}",
value, rust_value
));
}
Ok(DiffResult {
status: this_status,
name: rust.get_elisp_name(),