]> Cypherpunks repositories - gostls13.git/commit
os: improve Readdir test coverage, fix Readdir(0) on EOF
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 27 May 2011 19:14:48 +0000 (12:14 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 27 May 2011 19:14:48 +0000 (12:14 -0700)
commit0e865ab8e79e2a067419df3d2f1df05dc35d2536
tree79efd3cfb820e7815c2735546f72cc66e7221365
parent0b204e4625d158d5d466cdca2dedca4fda75dcf2
os: improve Readdir test coverage, fix Readdir(0) on EOF

Adds tests for Readdir and Readdirnames with different n
values.  No good way to inject faults during full reads,
though.

Also fixes bug report from fshahriar:
Readdir(0) wasn't behaving like Readdir(-1).

R=rsc, fshahriar
CC=golang-dev
https://golang.org/cl/4529092
src/pkg/os/dir_unix.go
src/pkg/os/os_test.go