This repository has been archived on 2025-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
tildes-parser/tests/topic.rs

15 lines
397 B
Rust

use std::fs::read_to_string;
use {insta::assert_debug_snapshot, tildes_parser::Topic};
#[test]
fn test_topic_parsing() {
let samples = ["link", "text", "deleted", "scheduled"];
for sample in samples {
let html =
read_to_string(format!("tests/samples/topic_{sample}.html")).unwrap();
let topic = &html.parse::<Topic>().unwrap();
assert_debug_snapshot!(sample, topic);
}
}