Skip to content

Commit cb5d610

Browse files
committed
Fix formatting of \0 in tests
This follows this PR in rustc: <rust-lang/rust#95345> Which breakage was discussed here: <rust-lang/rust#95732> Because this landed in 1.61.0, the MSRV has to be updated accordingly.
1 parent 2efbe5c commit cb5d610

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ license = "MIT/Apache-2.0"
1010
readme = "README.md"
1111
repository = "https://github.com/RazrFalcon/xmlparser"
1212
edition = "2018"
13+
rust-version = "1.61.0"
1314

1415
[features]
1516
default = ["std"]

tests/integration/cdata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ test!(cdata_09, "<p><![CDATA[bracket ]after]]></p>",
7171
test!(cdata_err_01, "<p><![CDATA[\0]]></p>",
7272
Token::ElementStart("", "p", 0..2),
7373
Token::ElementEnd(ElementEnd::Open, 2..3),
74-
Token::Error("invalid CDATA at 1:4 cause a non-XML character '\\u{0}' found at 1:13".to_string())
74+
Token::Error("invalid CDATA at 1:4 cause a non-XML character '\\0' found at 1:13".to_string())
7575
);

tests/integration/elements.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ test!(attribute_err_05, "<c a='<'/>",
211211

212212
test!(attribute_err_06, "<c a='\0'/>",
213213
Token::ElementStart("", "c", 0..2),
214-
Token::Error("invalid attribute at 1:3 cause a non-XML character '\\u{0}' found at 1:7".to_string())
214+
Token::Error("invalid attribute at 1:3 cause a non-XML character '\\0' found at 1:7".to_string())
215215
);
216216

217217
test!(attribute_err_07, "<c a='v'b='v'/>",

tests/integration/pi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ test!(declaration_err_12, "<?xml version='1.0'?><?xml version='1.0'?>",
119119
);
120120

121121
test!(declaration_err_13, "<?target \u{0000}content>",
122-
Token::Error("invalid processing instruction at 1:1 cause a non-XML character '\\u{0}' found at 1:10".to_string())
122+
Token::Error("invalid processing instruction at 1:1 cause a non-XML character '\\0' found at 1:10".to_string())
123123
);
124124

125125
test!(declaration_err_14, "<?xml version='1.0'encoding='UTF-8'?>",

0 commit comments

Comments
 (0)