Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestWriterReadFromUntilEOF (0.16 sec)

  1. src/bufio/bufio_test.go

    }
    
    func (r *emptyThenNonEmptyReader) Read(p []byte) (int, error) {
    	if r.n <= 0 {
    		return r.r.Read(p)
    	}
    	r.n--
    	return 0, nil
    }
    
    // Test for golang.org/issue/7611
    func TestWriterReadFromUntilEOF(t *testing.T) {
    	buf := new(bytes.Buffer)
    	w := NewWriterSize(buf, 5)
    
    	// Partially fill buffer
    	n, err := w.Write([]byte("0123"))
    	if n != 4 || err != nil {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top