use std::path::Path;
use walkdir::WalkDir;
fn parse_tzif_file(path: &Path) -> Result<(), tzif::error::Error> {
println!("parsing {path:?}");
let parsed = tzif::parse_tzif_file(path)?;
println!("{parsed:#?}");
Ok(())
}
#[test]
fn parse_tzif_testdata() -> Result<(), tzif::error::Error> {
for entry in WalkDir::new("testdata").follow_links(true) {
let entry = entry.unwrap();
if entry.file_type().is_file() {
parse_tzif_file(entry.path())?
}
}
Ok(())
}
#[test]
fn parse_posix_tz_string() {
assert!(tzif::parse_posix_tz_string(b"WGT3WGST,M3.5.0/-2,M10.5.0/-1").is_ok());
}