Skip to content

Commit f2ed7dd

Browse files
committed
Fix HTML5 test on Windows
1 parent fa1fea8 commit f2ed7dd

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

tests/documents/html5-windows.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
DocType( html)
2+
Characters(
3+
)
4+
StartElement(a, attr-error: error while parsing attribute at position 7: Attribute value must start with a quote.)
5+
Characters(Hey)
6+
EndElement(a)
7+
InvalidUtf8([13, 10, 38, 110, 98, 115, 112, 59, 13, 10]; invalid utf-8 sequence of 1 bytes from index 2)
8+
EndDocument

tests/xmlrs_reader_tests.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn sample_2_full() {
4040
);
4141
}
4242

43-
#[cfg(feature = "escape-html")]
43+
#[cfg(all(not(windows), feature = "escape-html"))]
4444
#[test]
4545
fn html5() {
4646
test(
@@ -50,6 +50,17 @@ fn html5() {
5050
);
5151
}
5252

53+
#[cfg(all(windows, feature = "escape-html"))]
54+
#[test]
55+
fn html5() {
56+
test(
57+
include_bytes!("documents/html5.html"),
58+
include_bytes!("documents/html5-windows.txt"),
59+
false,
60+
);
61+
}
62+
63+
5364
// #[test]
5465
// fn sample_3_short() {
5566
// test(

0 commit comments

Comments
 (0)