Compare value for comment block.

This commit is contained in:
Tom Alexander 2023-10-04 09:35:19 -04:00
parent e673aa862e
commit e6c809ab03
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 11 additions and 3 deletions

View File

@ -1513,10 +1513,18 @@ fn compare_comment_block<'b, 's>(
emacs: &'b Token<'s>,
rust: &'b CommentBlock<'s>,
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
let this_status = DiffStatus::Good;
let message = None;
let mut this_status = DiffStatus::Good;
let mut message = None;
// TODO: Compare :value
// 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
));
}
Ok(DiffResult {
status: this_status,