Compare type and value.
All checks were successful
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded

Since we only support org-mode tables, type is always org. Value seems to always be nil, not sure why.
This commit is contained in:
Tom Alexander 2023-10-02 23:57:17 -04:00
parent d4a2ad4a7f
commit e5a402ee1b
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -1388,7 +1388,22 @@ fn compare_table<'b, 's>(
}
}
// TODO: Compare :type :value
// Compare type
let table_type = get_property_unquoted_atom(emacs, ":type")?.expect("Table should have a type");
if table_type != "org" {
this_status = DiffStatus::Bad;
message = Some(format!(
"Table type mismatch (emacs != rust) {:?} != {:?}",
table_type, "org"
));
}
// Compare value
let value = get_property(emacs, ":value")?;
if value.is_some() {
this_status = DiffStatus::Bad;
message = Some(format!("Non-nil value {:?}", value))
}
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {
child_status.push(compare_ast_node(source, emacs_child, rust_child.into())?);