diff --git a/parsers/ChangeLog b/parsers/ChangeLog index 2b3ff55a3675f78033e56537d3409c58ec5dc1f5..910a4f8dada7b0c4f73a778a8cd4bb03cfd9fc19 100644 --- a/parsers/ChangeLog +++ b/parsers/ChangeLog @@ -122,6 +122,7 @@ XXXX-YY-ZZ RELEASER - Fix compatibility to uuid 1.12 - Implement Default for Tune - Re-export xso::error::FromElementError. + - Fix a few tests behind 'component' feature Version 0.21.0: 2024-07-25 Emmanuel Gil Peyrot diff --git a/parsers/src/stanza_error.rs b/parsers/src/stanza_error.rs index 7ba5209b290b05406fecc6e3cf29d8ead2af072c..567e80a5cf1b5b08239479e7e9932565eeb97698 100644 --- a/parsers/src/stanza_error.rs +++ b/parsers/src/stanza_error.rs @@ -375,9 +375,17 @@ mod tests { #[test] fn test_error_code() { + #[cfg(not(feature = "component"))] let elem: Element = r#" The feature requested is not implemented by the recipient or server and therefore cannot be processed. +"# + .parse() + .unwrap(); + #[cfg(feature = "component")] + let elem: Element = r#" + + The feature requested is not implemented by the recipient or server and therefore cannot be processed. "# .parse() .unwrap(); @@ -387,10 +395,19 @@ mod tests { #[test] fn test_error_multiple_text() { + #[cfg(not(feature = "component"))] let elem: Element = r#" Nœud non trouvé Node not found +"# + .parse() + .unwrap(); + #[cfg(feature = "component")] + let elem: Element = r#" + + Nœud non trouvé + Node not found "# .parse() .unwrap();