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

x/tools/internal/lsp/diff/difftest: test is overly sensitive to system language settings #42980

Closed
bcmills opened this issue Dec 3, 2020 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. help wanted 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. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Dec 3, 2020

2020-12-03T17:03:53-bdde162/linux-amd64-wsl
2020-12-03T17:00:53-8b44681/linux-amd64-wsl
2020-12-03T16:35:28-2ecf2a5/linux-amd64-wsl
2020-12-02T20:03:35-bef1c47/linux-amd64-wsl

--- FAIL: TestVerifyUnified (0.04s)
    --- FAIL: TestVerifyUnified/replace_no_newline (0.01s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+B\n\\ No newline at end of file\n"
            diff -u:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ 文件尾没有换行符\n+B\n\\ 文件尾没有换行符\n"
    --- FAIL: TestVerifyUnified/add_end (0.00s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+AB\n\\ No newline at end of file\n"
            diff -u:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ 文件尾没有换行符\n+AB\n\\ 文件尾没有换行符\n"
    --- FAIL: TestVerifyUnified/add_newline (0.00s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+A\n"
            diff -u:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ 文件尾没有换行符\n+A\n"
FAIL
FAIL	golang.org/x/tools/internal/lsp/diff/difftest	0.048s

This builder is configured with LANG=zh_CN.UTF-8 (CC @mengzhuo). If difftest wants to compare exact output text, it should probably set and/or unset LANG and the LC_* variables explicitly.

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Dec 3, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Dec 3, 2020
@gopherbot gopherbot added this to the Unreleased milestone Dec 3, 2020
@bcmills
Copy link
Contributor Author

bcmills commented Dec 3, 2020

Duplicate of #42962

@bcmills bcmills marked this as a duplicate of #42962 Dec 3, 2020
@bcmills bcmills closed this as completed Dec 3, 2020
@golang golang locked and limited conversation to collaborators Dec 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. help wanted 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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants