Skip to content

Commit

Permalink
Fix formatting of \0 in tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
krtab committed Oct 12, 2022
1 parent 2efbe5c commit cb5d610
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ license = "MIT/Apache-2.0"
readme = "README.md"
repository = "https://github.com/RazrFalcon/xmlparser"
edition = "2018"
rust-version = "1.61.0"

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ test!(cdata_09, "<p><![CDATA[bracket ]after]]></p>",
test!(cdata_err_01, "<p><![CDATA[\0]]></p>",
Token::ElementStart("", "p", 0..2),
Token::ElementEnd(ElementEnd::Open, 2..3),
Token::Error("invalid CDATA at 1:4 cause a non-XML character '\\u{0}' found at 1:13".to_string())
Token::Error("invalid CDATA at 1:4 cause a non-XML character '\\0' found at 1:13".to_string())
);
2 changes: 1 addition & 1 deletion tests/integration/elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ test!(attribute_err_05, "<c a='<'/>",

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

test!(attribute_err_07, "<c a='v'b='v'/>",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/pi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ test!(declaration_err_12, "<?xml version='1.0'?><?xml version='1.0'?>",
);

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

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

0 comments on commit cb5d610

Please sign in to comment.