]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: remove TestScript/get_unicode and an internal get test case
authorMichael Matloob <matloob@golang.org>
Tue, 1 Sep 2020 19:41:36 +0000 (15:41 -0400)
committerMichael Matloob <matloob@golang.org>
Tue, 1 Sep 2020 21:01:10 +0000 (21:01 +0000)
That test tested that import paths with non-ASCII unicode paths
were allowed by the Go command. Remove this test case because
golang.org/cl/251878 removes that support.

Also rewrite a test case in TestRepoRootForImportPath in the test
for cmd/go/internal/get to reflect that unicode directory names are now
disallowed.

Updates #29101

Change-Id: I669e220facd04fc82ccd05dd08e8f1ff4d48b1fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/252297
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/get/vcs_test.go
src/cmd/go/testdata/script/get_unicode.txt [deleted file]

index 91800baa83d216ce8ef82bc0228615aaa62b104b..195bc231eb1789a580a755fa326025f24b772200 100644 (file)
@@ -32,13 +32,10 @@ func TestRepoRootForImportPath(t *testing.T) {
                                Repo: "https://github.com/golang/groupcache",
                        },
                },
-               // Unicode letters in directories (issue 18660).
+               // Unicode letters in directories are not valid.
                {
                        "github.com/user/unicode/испытание",
-                       &RepoRoot{
-                               vcs:  vcsGit,
-                               Repo: "https://github.com/user/unicode",
-                       },
+                       nil,
                },
                // IBM DevOps Services tests
                {
diff --git a/src/cmd/go/testdata/script/get_unicode.txt b/src/cmd/go/testdata/script/get_unicode.txt
deleted file mode 100644 (file)
index d3b82bd..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-env GO111MODULE=off
-
-[!exec:git] skip
-[short] skip
-
-# Construct a repository that imports a non-ASCII path.
-cd $WORK/_origin/example.com/unicode
-exec git init
-exec git config user.name 'Nameless Gopher'
-exec git config user.email 'nobody@golang.org'
-exec git add unicode.go
-exec git commit -m 'add unicode.go'
-
-# Clone the repo into GOPATH so that 'go get -u' can find it.
-mkdir $GOPATH/src/example.com/unicode
-cd $GOPATH/src/example.com/unicode
-exec git clone $WORK/_origin/example.com/unicode .
-
-# Construct the imported repository.
-cd $WORK/_origin/example.com/испытание
-exec git init
-exec git config user.name 'Nameless Gopher'
-exec git config user.email 'nobody@golang.org'
-exec git add испытание.go
-exec git commit -m 'add испытание.go'
-
-# Clone that repo into GOPATH too.
-mkdir $GOPATH/src/example.com/испытание
-cd $GOPATH/src/example.com/испытание
-exec git clone $WORK/_origin/example.com/испытание .
-
-# Upgrading the importer should pull from the non-ASCII repo.
-cd $GOPATH
-go get -u example.com/unicode
-
--- $WORK/_origin/example.com/unicode/unicode.go --
-package unicode
-import _ "example.com/испытание"
--- $WORK/_origin/example.com/испытание/испытание.go --
-package испытание