Skip to content

Commit 410b65b

Browse files
committed
Remove test bom_from_reader
This is inside the check! macro, meaning it gets implemented per reader type, but from_reader() doesn't apply to SliceReader
1 parent 1787ec3 commit 410b65b

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/reader/mod.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff 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!(

0 commit comments

Comments
 (0)