mirror of https://github.com/golang/go.git
cmd/go: remove TestScript/get_unicode and an internal get test case
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>
This commit is contained in:
parent
afa150c2ea
commit
971203cad3
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 испытание
|
||||
Loading…
Reference in New Issue