Skip to content

Commit

Permalink
Add regression test for #706
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun committed Jun 9, 2024
1 parent 385a1f8 commit f84f92c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,24 @@ fn issue622() {
x => panic!("Expected `Err(Syntax(_))`, but got `{:?}`", x),
}
}

/// Regression test for https://github.com/tafia/quick-xml/issues/706
#[test]
fn issue706() {
let xml = r#"<?xml version="1.0" encoding="utf-8"?>
<?procinst-with-xml
<parameters>
<parameter id="version" value="0.1"/>
<parameter id="timeStamp" value="2024-01-16T10:44:00Z"/>
</parameters>
?>
<Document/>"#;
let mut reader = Reader::from_str(xml);
loop {
match reader.read_event() {
Err(e) => panic!("Error at position {}: {:?}", reader.buffer_position(), e),
Ok(Event::Eof) => break,
_ => (),
}
}
}

0 comments on commit f84f92c

Please sign in to comment.