Skip to content

test(core): pin LC_ALL=C in gitLog test so conflict detection is locale-independent - #3706

Merged
SoonIter merged 1 commit into
web-infra-dev:mainfrom
Marrrrrrrrry:test/gitlog-locale
Sep 28, 2026
Merged

SoonIter merged 1 commit into
web-infra-dev:mainfrom
Marrrrrrrrry:test/gitlog-locale

Conversation

@Marrrrrrrrry

Copy link
Copy Markdown
Contributor

The gitLog test suite drives a real git merge and matches the literal CONFLICT in its output. On machines with a localized git (e.g. LC_ALL=zh_CN, where the conflict marker prints as 「冲突」), the match fails and the test errors out even though the merge behaved exactly as expected. Pin LC_ALL=C for that call so the assertion is locale-independent. Verified failing on LC_ALL=zh_CN and passing with the fix.

The merge step matches the literal 'CONFLICT' in git output, but
localized git (e.g. LC_ALL=zh_CN) prints the localized word instead,
making the test fail on non-English machines. Pin LC_ALL=C for that
call so the assertion is locale-independent.

@SoonIter SoonIter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks~

@SoonIter
SoonIter enabled auto-merge (squash) September 28, 2026 06:49
@SoonIter
SoonIter merged commit 78eee3d into web-infra-dev:main Sep 28, 2026
6 checks passed
@Marrrrrrrrry
Marrrrrrrrry deleted the test/gitlog-locale branch September 28, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants