aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-01-07 14:18:22 -0800
committerRob Mensching <rob@firegiant.com>2021-01-07 14:19:42 -0800
commitce80be29e94aaa8f5ec926ead811238e58f23585 (patch)
tree560115c6ba692b6d8035acb08893828e03192074 /src
parent5b68993ddce6f9107d451946e308d5b3c565f341 (diff)
downloadwix-ce80be29e94aaa8f5ec926ead811238e58f23585.tar.gz
wix-ce80be29e94aaa8f5ec926ead811238e58f23585.tar.bz2
wix-ce80be29e94aaa8f5ec926ead811238e58f23585.zip
Add localization test
Closes wixtoolset/issues#4417
Diffstat (limited to 'src')
-rw-r--r--src/test/WixToolsetTest.UI/UIExtensionFixture.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.UI/UIExtensionFixture.cs b/src/test/WixToolsetTest.UI/UIExtensionFixture.cs
index 5c63587a..54c4c788 100644
--- a/src/test/WixToolsetTest.UI/UIExtensionFixture.cs
+++ b/src/test/WixToolsetTest.UI/UIExtensionFixture.cs
@@ -80,10 +80,32 @@ namespace WixToolsetTest.UI
80 }, results.Where(s => s.StartsWith("Property:WixUI_Mode")).ToArray()); 80 }, results.Where(s => s.StartsWith("Property:WixUI_Mode")).ToArray());
81 } 81 }
82 82
83 [Fact]
84 public void CanBuildUsingWixUIMondoLocalized()
85 {
86 var folder = TestData.Get(@"TestData\WixUI_Mondo");
87 var bindFolder = TestData.Get(@"TestData\data");
88 var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
89
90 var results = build.BuildAndQuery(BuildInGerman, "Control");
91 Assert.Equal(new[]
92 {
93 "&Ja",
94 }, results.Where(s => s.StartsWith("Control:ErrorDlg\tY")).Select(s => s.Split('\t')[9]).ToArray());
95 }
96
83 private static void Build(string[] args) 97 private static void Build(string[] args)
84 { 98 {
85 var result = WixRunner.Execute(args) 99 var result = WixRunner.Execute(args)
86 .AssertSuccess(); 100 .AssertSuccess();
87 } 101 }
102
103 private static void BuildInGerman(string[] args)
104 {
105 var localizedArgs = args.Append("-culture").Append("de-DE").ToArray();
106
107 var result = WixRunner.Execute(localizedArgs)
108 .AssertSuccess();
109 }
88 } 110 }
89} 111}