Added test to reproduce bug
I copied one of test file and also copied "sample_1_short" test code but changed filename.
This SHOULD pass since I have only added BOM code.. but was failed...
@@ -277,6 +277,15 @@ fn default_namespace_applies_to_end_elem() {
);
}
+#[test]
+fn can_read_files_with_bom() {
+ test(
+ include_bytes!("documents/sample_1_with_bom.xml"),
+ include_bytes!("documents/sample_1_short.txt"),
+ true,
+ );
+}
+
fn test(input: &[u8], output: &[u8], is_short: bool) {
let mut reader = Reader::from_reader(input);
reader
