Skip to content

Commit 2c3024b

Browse files
committed
Add comment describing erroneous_flush_retried
1 parent e0dfdc6 commit 2c3024b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libstd/io/buffered.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,15 @@ mod tests {
17661766
}
17671767
}
17681768

1769+
/// Previously the `LineWriter` could successfully write some bytes but
1770+
/// then fail to report that it has done so. Additionally, an erroneous
1771+
/// flush after a successful write was permanently ignored.
1772+
///
1773+
/// Test that a line writer correctly reports the number of written bytes,
1774+
/// and that it attempts to flush buffered lines from previous writes
1775+
/// before processing new data
1776+
///
1777+
/// Regression test for #37807
17691778
#[test]
17701779
fn erroneous_flush_retried() {
17711780
let a = AcceptOneThenFail { written: false, flushed: false };

0 commit comments

Comments
 (0)