Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: list_ambiguous_path test fails when Windows language is not english #37383

Open
ALTree opened this issue Feb 23, 2020 · 1 comment
Open
Labels
NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Feb 23, 2020

$ go version
go version devel +ebe49b2c29 Sun Feb 23 01:23:41 2020 +0000 windows/amd6

The TestScript/list_ambiguous_path test in cmd/go fails when the Windows language is set to something different from English, because the test hardcodes the missing file error message, which is localized.

An example failure from a system with the language set to Italian:

--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/list_ambiguous_path (0.36s)
        script_test.go:193:
            # Ensures that we can correctly list package patterns ending in '.go'.
            # See golang.org/issue/34653.
            # A single pattern for a package ending in '.go'. (0.060s)
            # Multiple patterns for packages including one ending in '.go'. (0.057s)
            # A single pattern for a Go file. (0.144s)
            # A single typo-ed pattern for a Go file. This should
            # treat the wrong pattern as if it were a package. (0.049s)
            # Multiple patterns for Go files with a typo. This should
            # treat the wrong pattern as if it were a non-existint file. (0.035s)
            > ! go list ./foo.go/a.go ./foo.go/b.go
            [stderr]
            CreateFile ./foo.go/b.go: Impossibile trovare il file specificato.
            [exit status 1]
            > [plan9] stderr 'stat ./foo.go/b.go: ''./foo.go/b.go'' does not exist'
            > [windows] stderr './foo.go/b.go: The system cannot find the file specified'
            FAIL: testdata\script\list_ambiguous_path.txt:26: no match for `(?m)./foo.go/b.go: The system cannot find the file specified` found in stderr
 
FAIL
FAIL    cmd/go  229.859s

This test is run by all.bat, which means that all.bat will not complete successfully on a non-english Windows machine.

cc @Helcaraxan (which added the test) and @bcmills

@ALTree ALTree added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. labels Feb 23, 2020
@ALTree ALTree added this to the Go1.15 milestone Feb 23, 2020
@ALTree ALTree changed the title cmd/go: TestScript/list_ambiguous_path test fails when Windows language is not english cmd/go: list_ambiguous_path test fails when Windows language is not english Feb 23, 2020
@gopherbot
Copy link

Change https://golang.org/cl/222577 mentions this issue: cmd/go: add international language support to list_ambiguous_path

@jayconrod jayconrod modified the milestones: Go1.15, Backlog May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants