From c8206455f1d11051599b77e49602674e2dc0616f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 7 Dec 2019 20:37:33 +0100 Subject: [PATCH] parsers: fix tests indentation with minidom PartialEq changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- xmpp-parsers/src/ibr.rs | 54 ++------------------------------ xmpp-parsers/src/muc/muc.rs | 10 +++--- xmpp-parsers/src/pubsub/event.rs | 11 +------ xmpp-parsers/src/roster.rs | 9 +----- 4 files changed, 8 insertions(+), 76 deletions(-) diff --git a/xmpp-parsers/src/ibr.rs b/xmpp-parsers/src/ibr.rs index 31d0e332..e8cabcbf 100644 --- a/xmpp-parsers/src/ibr.rs +++ b/xmpp-parsers/src/ibr.rs @@ -166,37 +166,7 @@ mod tests { #[test] fn test_ex9() { - let elem: Element = r#" - - - Use the enclosed form to register. If your Jabber client does not - support Data Forms, visit http://www.shakespeare.lit/contests.php - - - Contest Registration - - Please provide the following information - to sign up for our special contests! - - - jabber:iq:register - - - - - - - - - - - - - - - - -"# + let elem: Element = "Use the enclosed form to register. If your Jabber client does not support Data Forms, visit http://www.shakespeare.lit/contests.phpContest RegistrationPlease provide the following information to sign up for our special contests!jabber:iq:register" .parse() .unwrap(); let elem1 = elem.clone(); @@ -211,27 +181,7 @@ mod tests { #[test] fn test_ex10() { - let elem: Element = r#" - - - - jabber:iq:register - - - Juliet - - - Capulet - - - juliet@capulet.com - - - F - - - -"# + let elem: Element = "jabber:iq:registerJulietCapuletjuliet@capulet.comF" .parse() .unwrap(); let elem1 = elem.clone(); diff --git a/xmpp-parsers/src/muc/muc.rs b/xmpp-parsers/src/muc/muc.rs index ec0954c2..ef5186db 100644 --- a/xmpp-parsers/src/muc/muc.rs +++ b/xmpp-parsers/src/muc/muc.rs @@ -149,12 +149,10 @@ mod tests { #[test] fn test_muc_simple_password() { - let elem: Element = " - - coucou - " - .parse() - .unwrap(); + let elem: Element = + "coucou" + .parse() + .unwrap(); let elem1 = elem.clone(); let muc = Muc::try_from(elem).unwrap(); assert_eq!(muc.password, Some("coucou".to_owned())); diff --git a/xmpp-parsers/src/pubsub/event.rs b/xmpp-parsers/src/pubsub/event.rs index d46b7508..bfbca92f 100644 --- a/xmpp-parsers/src/pubsub/event.rs +++ b/xmpp-parsers/src/pubsub/event.rs @@ -383,16 +383,7 @@ mod tests { #[test] fn test_ex221_subscription() { - let elem: Element = r#" - - - -"# + let elem: Element = "" .parse() .unwrap(); let event = PubSubEvent::try_from(elem.clone()).unwrap(); diff --git a/xmpp-parsers/src/roster.rs b/xmpp-parsers/src/roster.rs index ea339958..fec25864 100644 --- a/xmpp-parsers/src/roster.rs +++ b/xmpp-parsers/src/roster.rs @@ -196,14 +196,7 @@ mod tests { #[test] fn test_multiple_groups() { - let elem: Element = r#" - - - A - B - - -"# + let elem: Element = "AB" .parse() .unwrap(); let elem1 = elem.clone();