aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path/filepath/path_test.go
diff options
context:
space:
mode:
authorRémy Oudompheng <oudomphe@phare.normalesup.org>2012-02-16 20:05:39 +0100
committerRémy Oudompheng <oudomphe@phare.normalesup.org>2012-02-16 20:05:39 +0100
commit3e7d804749f02fc4c4eac2194252a665c9aa30c8 (patch)
tree08c8b00d7fd86286aa2349d4bf645d497c59bb8a /src/pkg/path/filepath/path_test.go
parent8098d711f38c1136b771d9f637a5a2fd919d4d31 (diff)
downloadgo-3e7d804749f02fc4c4eac2194252a665c9aa30c8.tar.xz
path, path/filepath: polish documentation.
Fixes #2950. Fixes #2951. R=golang-dev, r CC=golang-dev, remy https://golang.org/cl/5672044
Diffstat (limited to 'src/pkg/path/filepath/path_test.go')
-rw-r--r--src/pkg/path/filepath/path_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/path/filepath/path_test.go b/src/pkg/path/filepath/path_test.go
index 4572707ace..6b70aa2cd7 100644
--- a/src/pkg/path/filepath/path_test.go
+++ b/src/pkg/path/filepath/path_test.go
@@ -559,6 +559,7 @@ var EvalSymlinksTestDirs = []EvalSymlinksTest{
{"test/dir/link3", "../../"},
{"test/link1", "../test"},
{"test/link2", "dir"},
+ {"test/linkabs", "/tmp"},
}
var EvalSymlinksTests = []EvalSymlinksTest{
@@ -571,6 +572,7 @@ var EvalSymlinksTests = []EvalSymlinksTest{
{"test/link2/..", "test"},
{"test/dir/link3", "."},
{"test/link2/link3/test", "test"},
+ {"test/linkabs", "/tmp"},
}
var EvalSymlinksAbsWindowsTests = []EvalSymlinksTest{
@@ -629,6 +631,9 @@ func TestEvalSymlinks(t *testing.T) {
for _, d := range tests {
path := simpleJoin(tmpDir, d.path)
dest := simpleJoin(tmpDir, d.dest)
+ if filepath.IsAbs(d.dest) {
+ dest = d.dest
+ }
if p, err := filepath.EvalSymlinks(path); err != nil {
t.Errorf("EvalSymlinks(%q) error: %v", d.path, err)
} else if filepath.Clean(p) != filepath.Clean(dest) {