- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for TestNegativeEOFReader (0.16 seconds)
-
src/bufio/scan_test.go
return c, nil } return -1, io.EOF } // Test that the scanner doesn't panic and returns ErrBadReadCount // on a reader that returns a negative count of bytes read (issue 38053). func TestNegativeEOFReader(t *testing.T) { r := negativeEOFReader(10) scanner := NewScanner(&r) c := 0 for scanner.Scan() { c++ if c > 1 { t.Error("read too many lines") break } }
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Fri Sep 22 16:22:42 GMT 2023 - 14.3K bytes - Click Count (0)