From 0abf9221bde4896831f4e54e00b504048a89160c Mon Sep 17 00:00:00 2001 From: Arthur Carcano Date: Wed, 12 Oct 2022 16:38:28 +0200 Subject: [PATCH] Fix formatting of \0 in tests by changing it to \u{1} This follows this PR in rustc: Which breakage was discussed here: Still relying on \0 would require bumping the MSRV to 1.61.0 --- tests/integration/cdata.rs | 4 ++-- tests/integration/elements.rs | 4 ++-- tests/integration/pi.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/cdata.rs b/tests/integration/cdata.rs index f607151..616f3a9 100644 --- a/tests/integration/cdata.rs +++ b/tests/integration/cdata.rs @@ -68,8 +68,8 @@ test!(cdata_09, "

", Token::ElementEnd(ElementEnd::Close("", "p"), 29..33) ); -test!(cdata_err_01, "

", +test!(cdata_err_01, "

", 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 '\\u{1}' found at 1:13".to_string()) ); diff --git a/tests/integration/elements.rs b/tests/integration/elements.rs index ff19bf4..1aec458 100644 --- a/tests/integration/elements.rs +++ b/tests/integration/elements.rs @@ -209,9 +209,9 @@ test!(attribute_err_05, "", Token::Error("invalid attribute at 1:3 cause expected ''' not '<' at 1:7".to_string()) ); -test!(attribute_err_06, "", +test!(attribute_err_06, "", 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 '\\u{1}' found at 1:7".to_string()) ); test!(attribute_err_07, "", diff --git a/tests/integration/pi.rs b/tests/integration/pi.rs index 7823a31..e524bcb 100644 --- a/tests/integration/pi.rs +++ b/tests/integration/pi.rs @@ -118,8 +118,8 @@ test!(declaration_err_12, "", Token::Error("unknown token at 1:22".to_string()) ); -test!(declaration_err_13, "", - Token::Error("invalid processing instruction at 1:1 cause a non-XML character '\\u{0}' found at 1:10".to_string()) +test!(declaration_err_13, "", + Token::Error("invalid processing instruction at 1:1 cause a non-XML character '\\u{1}' found at 1:10".to_string()) ); test!(declaration_err_14, "",