Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

Handle the current fallible FDF export API in the round-trip regression

FredAppse19f9646906d
diff --git a/crates/xfdf/src/tests.rs b/crates/xfdf/src/tests.rs
index 1f35f82b7..0da17c1e6 100644
--- a/crates/xfdf/src/tests.rs
+++ b/crates/xfdf/src/tests.rs
@@ -1254,7 +1254,7 @@ fn edited_button_export_values_round_trip_in_all_data_formats() {
set_value(&mut doc, "Agree", &FieldValue::Check(true)).unwrap();
set_value(&mut doc, "Size", &FieldValue::Radio(Some("Small".into()))).unwrap();
let doc = Document::open(Arc::new(write_full(&doc, &SaveOptions::default()).unwrap())).unwrap();
- let mut exports = vec![export_xfdf(&doc, false, true, "").into_bytes(), export_fdf(&doc, false, true, "")];
+ let mut exports = vec![export_xfdf(&doc, false, true, "").into_bytes(), export_fdf(&doc, false, true, "").unwrap()];
exports.extend([Format::Xml, Format::Csv, Format::Txt].map(|f| export_data(&doc, f).into_bytes()));
for (index, bytes) in exports.into_iter().enumerate() {
if index < 2 {