aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/path_windows_test.go
diff options
context:
space:
mode:
authorHiroshi Ioka <hirochachacha@gmail.com>2016-08-23 22:59:27 +0900
committerBrad Fitzpatrick <bradfitz@golang.org>2016-08-23 14:53:47 +0000
commit03723c909ee7b75c0c88ddb3f547642b9f48b009 (patch)
treee11cc514e51499f629f93f79f6df735eb9048865 /src/path/filepath/path_windows_test.go
parente893c72f2a5ec41bbf14f23b95ae10caf609260a (diff)
downloadgo-03723c909ee7b75c0c88ddb3f547642b9f48b009.tar.xz
path/filepath: use testenv.MustHaveSymlink to simplify symlink tests
Cleanup test code for symbolic links. Change-Id: I25f561cd34dc4d120a4143f933619d233a6cffc5 Reviewed-on: https://go-review.googlesource.com/27573 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/path/filepath/path_windows_test.go')
-rw-r--r--src/path/filepath/path_windows_test.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/path/filepath/path_windows_test.go b/src/path/filepath/path_windows_test.go
index b47cdfdb96..180c2e90af 100644
--- a/src/path/filepath/path_windows_test.go
+++ b/src/path/filepath/path_windows_test.go
@@ -13,29 +13,9 @@ import (
"path/filepath"
"reflect"
"strings"
- "syscall"
"testing"
)
-func init() {
- tmpdir, err := ioutil.TempDir("", "symtest")
- if err != nil {
- panic("failed to create temp directory: " + err.Error())
- }
- defer os.RemoveAll(tmpdir)
-
- err = os.Symlink("target", filepath.Join(tmpdir, "symlink"))
- if err == nil {
- return
- }
-
- err = err.(*os.LinkError).Err
- switch err {
- case syscall.EWINDOWS, syscall.ERROR_PRIVILEGE_NOT_HELD:
- supportsSymlinks = false
- }
-}
-
func TestWinSplitListTestsAreValid(t *testing.T) {
comspec := os.Getenv("ComSpec")
if comspec == "" {