opml/opml_api/tests/spec_samples.rs

23 lines
527 B
Rust
Raw Permalink Normal View History

2021-03-23 12:02:16 +00:00
use std::{error::Error, fs};
2020-05-23 12:32:40 +00:00
use opml::*;
#[test]
pub fn test_spec_samples() -> Result<(), Box<dyn Error>> {
let samples = vec![
"tests/spec_samples/category.opml",
"tests/spec_samples/directory.opml",
"tests/spec_samples/placesLived.opml",
"tests/spec_samples/simpleScript.opml",
"tests/spec_samples/states.opml",
"tests/spec_samples/subscriptionList.opml",
];
for sample in samples {
2024-01-21 12:44:26 +00:00
let sample_content = fs::read_to_string(sample)?;
2021-03-23 12:02:16 +00:00
OPML::from_str(&sample_content)?;
2020-05-23 12:32:40 +00:00
}
Ok(())
}