@@ -2,7 +2,6 @@ use quick_xml::events::attributes::Attribute;
22use quick_xml:: events:: Event :: * ;
33use quick_xml:: name:: QName ;
44use quick_xml:: reader:: Reader ;
5- use quick_xml:: Error ;
65use std:: borrow:: Cow ;
76
87use pretty_assertions:: assert_eq;
@@ -89,21 +88,6 @@ fn test_comment_starting_with_gt() {
8988 }
9089}
9190
92- #[ test]
93- fn test_issue94 ( ) {
94- let data = br#"<Run>
95- <!B>
96- </Run>"# ;
97- let mut reader = Reader :: from_reader ( & data[ ..] ) ;
98- reader. trim_text ( true ) ;
99- loop {
100- match reader. read_event ( ) {
101- Ok ( Eof ) | Err ( ..) => break ,
102- _ => ( ) ,
103- }
104- }
105- }
106-
10791#[ test]
10892fn test_no_trim ( ) {
10993 let mut reader = Reader :: from_str ( " <tag> text </tag> " ) ;
@@ -151,37 +135,3 @@ fn test_clone_reader() {
151135 assert ! ( matches!( cloned. read_event( ) . unwrap( ) , Text ( _) ) ) ;
152136 assert ! ( matches!( cloned. read_event( ) . unwrap( ) , End ( _) ) ) ;
153137}
154-
155- #[ test]
156- fn test_issue299 ( ) -> Result < ( ) , Error > {
157- let xml = r#"
158- <?xml version="1.0" encoding="utf8"?>
159- <MICEX_DOC xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
160- <SECURITY SecurityId="PLZL" ISIN="RU000A0JNAA8" SecShortName="Short Name" PriceType="CASH">
161- <RECORDS RecNo="1" TradeNo="1111" TradeDate="2021-07-08" TradeTime="15:00:00" BuySell="S" SettleCode="Y1Dt" Decimals="3" Price="13057.034" Quantity="766" Value="10001688.29" AccInt="0" Amount="10001688.29" Balance="766" TrdAccId="X0011" ClientDetails="2222" CPFirmId="3333" CPFirmShortName="Firm Short Name" Price2="13057.034" RepoPart="2" ReportTime="16:53:27" SettleTime="17:47:06" ClientCode="4444" DueDate="2021-07-09" EarlySettleStatus="N" RepoRate="5.45" RateType="FIX"/>
162- </SECURITY>
163- </MICEX_DOC>
164- "# ;
165- let mut reader = Reader :: from_str ( xml) ;
166- loop {
167- match reader. read_event ( ) ? {
168- Start ( e) | Empty ( e) => {
169- let attr_count = match e. name ( ) . as_ref ( ) {
170- b"MICEX_DOC" => 1 ,
171- b"SECURITY" => 4 ,
172- b"RECORDS" => 26 ,
173- _ => unreachable ! ( ) ,
174- } ;
175- assert_eq ! (
176- attr_count,
177- e. attributes( ) . filter( Result :: is_ok) . count( ) ,
178- "mismatch att count on '{:?}'" ,
179- reader. decoder( ) . decode( e. name( ) . as_ref( ) )
180- ) ;
181- }
182- Eof => break ,
183- _ => ( ) ,
184- }
185- }
186- Ok ( ( ) )
187- }
0 commit comments