File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -1581,33 +1581,13 @@ mod test {
15811581 use crate :: reader:: Reader ;
15821582 use pretty_assertions:: assert_eq;
15831583
1584- /// When `encoding` feature is enabled, encoding should be detected
1585- /// from BOM (UTF-8) and BOM should be stripped.
1586- ///
1587- /// When `encoding` feature is disabled, UTF-8 is assumed and BOM
1588- /// character should be stripped for consistency
1589- #[ $test]
1590- $( $async) ? fn bom_from_reader( ) {
1591- let mut reader = Reader :: from_reader( "\u{feff} \u{feff} " . as_bytes( ) ) ;
1592-
1593- assert_eq!(
1594- reader. $read_event( $buf) $( . $await) ? . unwrap( ) ,
1595- Event :: Text ( BytesText :: from_escaped( "\u{feff} " ) )
1596- ) ;
1597-
1598- assert_eq!(
1599- reader. $read_event( $buf) $( . $await) ? . unwrap( ) ,
1600- Event :: Eof
1601- ) ;
1602- }
1603-
16041584 /// When parsing from &str, encoding is fixed (UTF-8), so
16051585 /// - when `encoding` feature is disabled, the behavior the
16061586 /// same as in `bom_from_reader` text
16071587 /// - when `encoding` feature is enabled, the behavior should
16081588 /// stay consistent, so the first BOM character is stripped
16091589 #[ $test]
1610- $( $async) ? fn bom_from_str ( ) {
1590+ $( $async) ? fn bom ( ) {
16111591 let mut reader = Reader :: from_str( "\u{feff} \u{feff} " ) ;
16121592
16131593 assert_eq!(
You can’t perform that action at this time.
0 commit comments