Compare switches for example block.
This commit is contained in:
parent
1d7770e590
commit
650cbc17db
@ -1545,7 +1545,7 @@ fn compare_example_block<'b, 's>(
|
||||
let mut this_status = DiffStatus::Good;
|
||||
let mut message = None;
|
||||
|
||||
// TODO: Compare :switches :number-lines :preserve-indent :retain-labels :use-labels :label-fmt
|
||||
// TODO: Compare :number-lines :preserve-indent :retain-labels :use-labels :label-fmt
|
||||
|
||||
// Compare value
|
||||
let contents = get_property_quoted_string(emacs, ":value")?.unwrap_or(String::new());
|
||||
@ -1557,6 +1557,16 @@ fn compare_example_block<'b, 's>(
|
||||
));
|
||||
}
|
||||
|
||||
// Compare switches
|
||||
let switches = get_property_quoted_string(emacs, ":switches")?;
|
||||
if switches.as_ref().map(String::as_str) != rust.switches {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
"Switches mismatch (emacs != rust) {:?} != {:?}",
|
||||
switches, rust.switches
|
||||
));
|
||||
}
|
||||
|
||||
Ok(DiffResult {
|
||||
status: this_status,
|
||||
name: rust.get_elisp_name(),
|
||||
|
Loading…
Reference in New Issue
Block a user