Skip to content

Commit d4305eb

Browse files
ranjeshjCopilot
andcommitted
test(setup): cover WSL localized version labels
Add regression data for the MessagePackageVersions labels from microsoft/WSL localization resources so the WSL version parser is exercised against every published locale. Co-authored-by: Copilot <[email protected]>
1 parent 174c79c commit d4305eb

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

‎tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,39 @@ public void WslInstallSupport_TryParseWslVersion_HandlesLocalizedAndHyphenatedLa
525525
$"Expected parsed version {version} to satisfy minimum install requirement");
526526
}
527527

528+
// Mirrors microsoft/WSL localization/strings/*/Resources.resw MessagePackageVersions.
529+
[Theory]
530+
[InlineData("cs-CZ", "Verze WSL: 2.7.3.0")]
531+
[InlineData("da-DK", "WSL-version: 2.7.3.0")]
532+
[InlineData("de-DE", "WSL-Version: 2.7.3.0")]
533+
[InlineData("en-GB", "WSL version: 2.7.3.0")]
534+
[InlineData("en-US", "WSL version: 2.7.3.0")]
535+
[InlineData("es-ES", "Versión de WSL: 2.7.3.0")]
536+
[InlineData("fi-FI", "WSL-versio: 2.7.3.0")]
537+
[InlineData("fr-FR", "Version WSL : 2.7.3.0")]
538+
[InlineData("hu-HU", "WSL-verzió: 2.7.3.0")]
539+
[InlineData("it-IT", "Versione WSL: 2.7.3.0")]
540+
[InlineData("ja-JP", "WSL バージョン: 2.7.3.0")]
541+
[InlineData("ko-KR", "WSL 버전: 2.7.3.0")]
542+
[InlineData("nb-NO", "WSL-versjon: 2.7.3.0")]
543+
[InlineData("nl-NL", "WSL-versie: 2.7.3.0")]
544+
[InlineData("pl-PL", "Wersja podsystemu WSL: 2.7.3.0")]
545+
[InlineData("pt-BR", "Versão do WSL: 2.7.3.0")]
546+
[InlineData("pt-PT", "Versão WSL: 2.7.3.0")]
547+
[InlineData("ru-RU", "Версия WSL: 2.7.3.0")]
548+
[InlineData("sv-SE", "WSL-version: 2.7.3.0")]
549+
[InlineData("tr-TR", "WSL sürümü: 2.7.3.0")]
550+
[InlineData("zh-CN", "WSL 版本: 2.7.3.0")]
551+
[InlineData("zh-TW", "WSL 版本: 2.7.3.0")]
552+
public void WslInstallSupport_TryParseWslVersion_HandlesMicrosoftLocalizedPackageVersionLabels(
553+
string locale,
554+
string output)
555+
{
556+
Assert.True(WslInstallSupport.TryParseWslVersion(output, out var version),
557+
$"Expected TryParseWslVersion to succeed for {locale}: {output}");
558+
Assert.Equal(new Version(2, 7, 3, 0), version);
559+
}
560+
528561
[Theory]
529562
[InlineData("WSL-Version: 2.7.7.0", "2.7.7.0")]
530563
[InlineData("Versión de WSL: 2.7.3.0", "2.7.3.0")]

0 commit comments

Comments
 (0)