summaryrefslogtreecommitdiff
path: root/src/pkg/path/filepath/path_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/path/filepath/path_test.go')
-rw-r--r--src/pkg/path/filepath/path_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/pkg/path/filepath/path_test.go b/src/pkg/path/filepath/path_test.go
index b8766588c..070905fd3 100644
--- a/src/pkg/path/filepath/path_test.go
+++ b/src/pkg/path/filepath/path_test.go
@@ -869,3 +869,29 @@ func TestDriveLetterInEvalSymlinks(t *testing.T) {
t.Errorf("Results of EvalSymlinks do not match: %q and %q", flp, fup)
}
}
+
+func TestBug3486(t *testing.T) { // http://code.google.com/p/go/issues/detail?id=3486
+ root, err := filepath.EvalSymlinks(os.Getenv("GOROOT"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ lib := filepath.Join(root, "lib")
+ src := filepath.Join(root, "src")
+ seenSrc := false
+ filepath.Walk(root, func(pth string, info os.FileInfo, err error) error {
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ switch pth {
+ case lib:
+ return filepath.SkipDir
+ case src:
+ seenSrc = true
+ }
+ return nil
+ })
+ if !seenSrc {
+ t.Fatalf("%q not seen", src)
+ }
+}