From 486e64ebea831d87d72f5b6e2a87a6fe1998e9bb Mon Sep 17 00:00:00 2001 From: Mingun Date: Fri, 21 Jun 2024 13:06:57 +0500 Subject: [PATCH] Remove non-namespaced reader tests from xmlrs_reader_tests.rs The same things already tested more formally in tests/reader.rs and tests/reader-attributes.rs --- tests/README.md | 2 - tests/documents/sample_1_full.txt | 88 ------------------------------ tests/documents/sample_1_short.txt | 34 ------------ tests/xmlrs_reader_tests.rs | 18 ------ 4 files changed, 142 deletions(-) delete mode 100644 tests/documents/sample_1_full.txt delete mode 100644 tests/documents/sample_1_short.txt diff --git a/tests/README.md b/tests/README.md index 396e2d14..0d7b145a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -21,8 +21,6 @@ rpm_primary2.xml long, mix of attributes and text, not much escaping, mix of attribute lengths, some namespaces sample_1.xml short, mix of attributes and text, lots of escapes -sample_1_short.txt -sample_1_full.txt sample_ns.xml short, lots of namespaces, no escapes sample_rss.xml diff --git a/tests/documents/sample_1_full.txt b/tests/documents/sample_1_full.txt deleted file mode 100644 index d31b2011..00000000 --- a/tests/documents/sample_1_full.txt +++ /dev/null @@ -1,88 +0,0 @@ -StartDocument(1.0, utf-8) -Characters( -) -StartElement(project [name="project-name"]) -Characters( - ) -StartElement(libraries) -Characters( - ) -EmptyElement(library [groupId="org.example", artifactId="", version="0.1"]) -Characters( - ) -EmptyElement(library [groupId="com.example", artifactId=""cool-lib&", version="999"]) -Characters( - ) -EndElement(libraries) -Characters( - ) -StartElement(module [name="module-1"]) -Characters( - ) -StartElement(files) -Characters( - ) -StartElement(file [name="somefile.java", type="java"]) -Characters( - Some class - ) -EndElement(file) -Characters( - ) -StartElement(file [name="another_file.java", type="java"]) -Characters( - Another "java" class - ) -EndElement(file) -Characters( - ) -StartElement(file [name="config.xml", type="xml"]) -Characters( - Weird 'XML' config - ) -EndElement(file) -Characters( - ) -EndElement(files) -Characters( - ) -StartElement(libraries) -Characters( - ) -EmptyElement(library [groupId="junit", artifactId="junit", version="1.9.5"]) -Characters( - ) -EndElement(libraries) -Characters( - ) -EndElement(module) -Characters( - ) -StartElement(module [name="module-2"]) -Characters( - ) -StartElement(files) -Characters( - ) -StartElement(file [name="program.js", type="javascript"]) -Characters( - JavaScript & program - ) -EndElement(file) -Characters( - ) -StartElement(file [name="style.css", type="css"]) -Characters( - Cascading style sheet: © - ҉ - ) -EndElement(file) -Characters( - ) -EndElement(files) -Characters( - ) -EndElement(module) -Characters( -) -EndElement(project) -EndDocument diff --git a/tests/documents/sample_1_short.txt b/tests/documents/sample_1_short.txt deleted file mode 100644 index 28a39175..00000000 --- a/tests/documents/sample_1_short.txt +++ /dev/null @@ -1,34 +0,0 @@ -StartDocument(1.0, utf-8) -StartElement(project [name="project-name"]) -StartElement(libraries) -EmptyElement(library [groupId="org.example", artifactId="", version="0.1"]) -EmptyElement(library [groupId="com.example", artifactId=""cool-lib&", version="999"]) -EndElement(libraries) -StartElement(module [name="module-1"]) -StartElement(files) -StartElement(file [name="somefile.java", type="java"]) -Characters(Some class) -EndElement(file) -StartElement(file [name="another_file.java", type="java"]) -Characters(Another "java" class) -EndElement(file) -StartElement(file [name="config.xml", type="xml"]) -Characters(Weird 'XML' config) -EndElement(file) -EndElement(files) -StartElement(libraries) -EmptyElement(library [groupId="junit", artifactId="junit", version="1.9.5"]) -EndElement(libraries) -EndElement(module) -StartElement(module [name="module-2"]) -StartElement(files) -StartElement(file [name="program.js", type="javascript"]) -Characters(JavaScript & program) -EndElement(file) -StartElement(file [name="style.css", type="css"]) -Characters(Cascading style sheet: © - ҉) -EndElement(file) -EndElement(files) -EndElement(module) -EndElement(project) -EndDocument diff --git a/tests/xmlrs_reader_tests.rs b/tests/xmlrs_reader_tests.rs index 01413b2b..3efbf2a1 100644 --- a/tests/xmlrs_reader_tests.rs +++ b/tests/xmlrs_reader_tests.rs @@ -6,24 +6,6 @@ use quick_xml::name::{QName, ResolveResult}; use quick_xml::reader::NsReader; use std::str::from_utf8; -#[test] -fn sample_1_short() { - test( - include_str!("documents/sample_1.xml"), - include_str!("documents/sample_1_short.txt"), - true, - ); -} - -#[test] -fn sample_1_full() { - test( - include_str!("documents/sample_1.xml"), - include_str!("documents/sample_1_full.txt"), - false, - ); -} - #[cfg(feature = "escape-html")] #[test] fn html5() {