aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Util')
-rw-r--r--src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingDiscouragedVariableNames.wxs19
-rw-r--r--src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs47
2 files changed, 0 insertions, 66 deletions
diff --git a/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingDiscouragedVariableNames.wxs b/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingDiscouragedVariableNames.wxs
deleted file mode 100644
index 68f46af8..00000000
--- a/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingDiscouragedVariableNames.wxs
+++ /dev/null
@@ -1,19 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
2 <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
3 <BootstrapperApplication>
4 <BootstrapperApplicationDll SourceFile="fakeba.dll" />
5 </BootstrapperApplication>
6
7 <util:RegistrySearch
8 Variable="WixCustomVariable"
9 Root="HKLM"
10 Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Custom"
11 Value="Release"
12 Result="value"
13 Bitness="always64" />
14
15 <Chain>
16 <MsiPackage SourceFile="test.msi" />
17 </Chain>
18 </Bundle>
19</Wix>
diff --git a/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs
index 7cc3a6d4..06e70dcf 100644
--- a/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs
+++ b/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs
@@ -471,53 +471,6 @@ namespace WixToolsetTest.Util
471 } 471 }
472 472
473 [Fact] 473 [Fact]
474 public void CanBuildBundleWithWarningsWithSearchesUsingDiscouragedVariableNames()
475 {
476 var folder = TestData.Get("TestData", "BundleWithSearches");
477 var rootFolder = TestData.Get();
478 var wixext = Path.Combine(rootFolder, "WixToolset.Util.wixext.dll");
479
480 using (var fs = new DisposableFileSystem())
481 {
482 var baseFolder = fs.GetFolder();
483 var intermediateFolder = Path.Combine(baseFolder, "obj");
484 var bundlePath = Path.Combine(baseFolder, @"bin\test.exe");
485 var baFolderPath = Path.Combine(baseFolder, "ba");
486 var extractFolderPath = Path.Combine(baseFolder, "extract");
487
488 var result = WixRunner.Execute(false, new[]
489 {
490 "build",
491 Path.Combine(folder, "BundleUsingDiscouragedVariableNames.wxs"),
492 "-ext", wixext,
493 "-loc", Path.Combine(folder, "Bundle.en-us.wxl"),
494 "-bindpath", Path.Combine(folder, "data"),
495 "-intermediateFolder", intermediateFolder,
496 "-o", bundlePath,
497 });
498
499 var messages = result.Messages.Select(m => m.ToString()).ToList();
500 messages.Sort();
501
502 WixAssert.CompareLineByLine(new[]
503 {
504 "The *Search/@Variable attribute's value begins with the reserved prefix 'Wix'. Some prefixes are reserved by the WiX toolset for well-known values. Change your attribute's value to not begin with the same prefix.",
505 }, messages.ToArray());
506
507 result.AssertSuccess();
508
509 var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath);
510 extractResult.AssertSuccess();
511
512 var utilSearches = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/*[self::burn:ExtensionSearch or self::burn:DirectorySearch or self::burn:FileSearch or self::burn:MsiProductSearch or self::burn:RegistrySearch]");
513 WixAssert.CompareLineByLine(new[]
514 {
515 @"<RegistrySearch Id='wrsvJmsaXS39nKFUh9CVvRE6SSC4qk' Variable='WixCustomVariable' Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Custom' Value='Release' Win64='yes' Type='value' VariableType='string' />",
516 }, utilSearches);
517 }
518 }
519
520 [Fact]
521 public void CannotBuildBundleWithSearchesUsingBuiltinVariableNames() 474 public void CannotBuildBundleWithSearchesUsingBuiltinVariableNames()
522 { 475 {
523 var folder = TestData.Get("TestData", "BundleWithSearches"); 476 var folder = TestData.Get("TestData", "BundleWithSearches");