From 4d7afea2e9f9b7dfdf0296dba8973bcb7dd608a0 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 7 Apr 2009 00:40:50 -0700 Subject: throw away . and .. in directory listings R=r DELTA=13 (11 added, 0 deleted, 2 changed) OCL=27147 CL=27154 --- src/lib/os/os_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib/os/os_test.go') diff --git a/src/lib/os/os_test.go b/src/lib/os/os_test.go index 2f0cd883c..93a2c5e08 100644 --- a/src/lib/os/os_test.go +++ b/src/lib/os/os_test.go @@ -110,6 +110,9 @@ func testReaddirnames(dir string, contents []string, t *testing.T) { for i, m := range contents { found := false; for j, n := range s { + if n == "." || n == ".." { + t.Errorf("got %s in directory", n); + } if m == n { if found { t.Error("present twice:", m); -- cgit v1.2.3