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 @@ -1650,33 +1650,13 @@ mod test {
16501650 use crate :: reader:: Reader ;
16511651 use pretty_assertions:: assert_eq;
16521652
1653- /// When `encoding` feature is enabled, encoding should be detected
1654- /// from BOM (UTF-8) and BOM should be stripped.
1655- ///
1656- /// When `encoding` feature is disabled, UTF-8 is assumed and BOM
1657- /// character should be stripped for consistency
1658- #[ $test]
1659- $( $async) ? fn bom_from_reader( ) {
1660- let mut reader = Reader :: from_reader( "\u{feff} \u{feff} " . as_bytes( ) ) ;
1661-
1662- assert_eq!(
1663- reader. $read_event( $buf) $( . $await) ? . unwrap( ) ,
1664- Event :: Text ( BytesText :: from_escaped( "\u{feff} " ) )
1665- ) ;
1666-
1667- assert_eq!(
1668- reader. $read_event( $buf) $( . $await) ? . unwrap( ) ,
1669- Event :: Eof
1670- ) ;
1671- }
1672-
16731653 /// When parsing from &str, encoding is fixed (UTF-8), so
16741654 /// - when `encoding` feature is disabled, the behavior the
16751655 /// same as in `bom_from_reader` text
16761656 /// - when `encoding` feature is enabled, the behavior should
16771657 /// stay consistent, so the first BOM character is stripped
16781658 #[ $test]
1679- $( $async) ? fn bom_from_str ( ) {
1659+ $( $async) ? fn bom ( ) {
16801660 let mut reader = Reader :: from_str( "\u{feff} \u{feff} " ) ;
16811661
16821662 assert_eq!(
You can’t perform that action at this time.
0 commit comments