diff --git a/exampledir/test/excel.xlsx b/exampledir/test/excel.xlsx new file mode 100644 index 0000000..1d3fb36 Binary files /dev/null and b/exampledir/test/excel.xlsx differ diff --git a/src/adapters/zip.rs b/src/adapters/zip.rs index 1c61ca4..d616528 100644 --- a/src/adapters/zip.rs +++ b/src/adapters/zip.rs @@ -268,4 +268,25 @@ mod test { Ok(()) } + + #[tokio::test] + async fn search_xlsx_with_extension_config() -> Result<()> { + let zip = test_data_dir().join("excel.xlsx"); + let (a, d) = simple_fs_adapt_info(&zip).await?; + let v = adapted_to_vec( + loop_adapt( + &ZipAdapter { + extensions: vec![String::from("xlsx")], + mimetypes: Vec::new(), + }, + d, + a, + ) + .await?, + ) + .await?; + assert_eq!(String::from_utf8(v[..18].to_vec())?, "PREFIX:_rels/.rels"); // first filename in the spreadsheet archive + + Ok(()) + } }