Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jlondonobo committed Apr 20, 2024
1 parent f4ae6ff commit 95c6e39
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Binary file added tests/empty_s_attribute.xlsx
Binary file not shown.
23 changes: 23 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1897,3 +1897,26 @@ fn issue_391_shared_formula() {
assert_eq!(expect.end(), res.end());
assert!(expect.cells().eq(res.cells()));
}

#[test]
fn issue_420_empty_s_attribute() {
setup();

let path = format!(
"{}/tests/empty_s_attribute.xlsx",
env!("CARGO_MANIFEST_DIR")
);
let mut excel: Xlsx<_> = open_workbook(&path).unwrap();

let range = excel.worksheet_range("Sheet1").unwrap();
range_eq!(
range,
[
[String("Name".to_string()), String("Value".to_string())],
[String("John".to_string()), Float(1.)],
[String("Sophia".to_string()), Float(2.)],
[String("Peter".to_string()), Float(3.)],
[String("Sam".to_string()), Float(4.)],
]
);
}

0 comments on commit 95c6e39

Please sign in to comment.