File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 22//!
33//! Name each module / test as `issue<GH number>` and keep sorted by issue number
44
5+ use std:: sync:: mpsc;
6+
57use quick_xml:: events:: { BytesStart , Event } ;
68use quick_xml:: name:: QName ;
79use quick_xml:: reader:: Reader ;
@@ -20,6 +22,28 @@ fn issue115() {
2022 }
2123}
2224
25+ /// Regression test for https://github.com/tafia/quick-xml/issues/360
26+ #[ test]
27+ fn issue360 ( ) {
28+ let ( tx, rx) = mpsc:: channel :: < Event > ( ) ;
29+
30+ std:: thread:: spawn ( move || {
31+ let mut r = Reader :: from_str ( "<tag1 attr1='line 1\n line 2'></tag1>" ) ;
32+ loop {
33+ let event = r. read_event ( ) . unwrap ( ) ;
34+ if event == Event :: Eof {
35+ tx. send ( event) . unwrap ( ) ;
36+ break ;
37+ } else {
38+ tx. send ( event) . unwrap ( ) ;
39+ }
40+ }
41+ } ) ;
42+ for event in rx. iter ( ) {
43+ println ! ( "{:?}" , event) ;
44+ }
45+ }
46+
2347/// Regression test for https://github.com/tafia/quick-xml/issues/514
2448mod issue514 {
2549 use super :: * ;
You can’t perform that action at this time.
0 commit comments