Compare keyword keys and values.
This commit is contained in:
parent
400f53e440
commit
7c471ab32e
@ -1392,7 +1392,30 @@ fn compare_keyword<'s>(
|
||||
Ok(_) => {}
|
||||
};
|
||||
|
||||
// TODO: Compare key and value
|
||||
let key = unquote(
|
||||
get_property(emacs, ":key")?
|
||||
.ok_or("Emacs keywords should have a :key")?
|
||||
.as_atom()?,
|
||||
)?;
|
||||
if key != rust.key.to_uppercase() {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
"Mismatchs keyword keys (emacs != rust) {:?} != {:?}",
|
||||
key, rust.key
|
||||
))
|
||||
}
|
||||
let value = unquote(
|
||||
get_property(emacs, ":value")?
|
||||
.ok_or("Emacs keywords should have a :value")?
|
||||
.as_atom()?,
|
||||
)?;
|
||||
if value != rust.value {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
"Mismatchs keyword values (emacs != rust) {:?} != {:?}",
|
||||
value, rust.value
|
||||
))
|
||||
}
|
||||
|
||||
Ok(DiffResult {
|
||||
status: this_status,
|
||||
|
Loading…
Reference in New Issue
Block a user