Compare value for export block.

This commit is contained in:
Tom Alexander
2023-10-05 02:06:26 -04:00
parent 386ad5091d
commit 1da521b08a
8 changed files with 38 additions and 5 deletions

View File

@@ -1845,9 +1845,19 @@ fn compare_export_block<'b, 's>(
let mut this_status = DiffStatus::Good;
let mut message = None;
// TODO: Compare :type :value
// TODO: Compare :type
// TODO: Compare :caption
// Compare value
let contents = get_property_quoted_string(emacs, ":value")?.unwrap_or(String::new());
if contents != rust.contents {
this_status = DiffStatus::Bad;
message = Some(format!(
"Value mismatch (emacs != rust) {:?} != {:?}",
contents, rust.contents
));
}
// Compare name
let name = get_property_quoted_string(emacs, ":name")?;
if name.as_ref().map(String::as_str) != rust.name {