use ass_core::{Script, Section};
#[test]
fn test_fonts_section_parsing() {
let script_with_fonts = r"
[Script Info]
Title: Test
[Fonts]
fontname: Arial
0
M 0 0 L 100 100
[Events]
Format: Start, End, Style, Text
Dialogue: 0:00:00.00,0:00:05.00,Default,Test
";
let script = Script::parse(script_with_fonts).expect("Script parsing should work");
assert!(script
.sections()
.iter()
.any(|section| matches!(section, Section::Fonts(_))));
}
#[test]
fn test_graphics_section_parsing() {
let script_with_graphics = r"
[Script Info]
Title: Test
[Graphics]
filename: logo.png
0
89504E470D0A1A0A
[Events]
Format: Start, End, Style, Text
Dialogue: 0:00:00.00,0:00:05.00,Default,Test
";
let script = Script::parse(script_with_graphics).expect("Script parsing should work");
assert!(script
.sections()
.iter()
.any(|section| matches!(section, Section::Graphics(_))));
}