diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 81f780dc..068ae2b7 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -428,6 +428,41 @@ namespace WixToolsetTest.CoreIntegration | |||
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | [Fact] | 430 | [Fact] |
| 431 | public void PopulatesEnvironmentTable() | ||
| 432 | { | ||
| 433 | var folder = TestData.Get(@"TestData"); | ||
| 434 | |||
| 435 | using (var fs = new DisposableFileSystem()) | ||
| 436 | { | ||
| 437 | var baseFolder = fs.GetFolder(); | ||
| 438 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 439 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 440 | |||
| 441 | var result = WixRunner.Execute(new[] | ||
| 442 | { | ||
| 443 | "build", | ||
| 444 | Path.Combine(folder, "Environment", "Environment.wxs"), | ||
| 445 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 446 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 447 | "-intermediateFolder", intermediateFolder, | ||
| 448 | "-o", msiPath | ||
| 449 | }); | ||
| 450 | |||
| 451 | result.AssertSuccess(); | ||
| 452 | |||
| 453 | Assert.True(File.Exists(msiPath)); | ||
| 454 | var results = Query.QueryDatabase(msiPath, new[] { "Environment" }); | ||
| 455 | Assert.Equal(new[] | ||
| 456 | { | ||
| 457 | "Environment:WixEnvironmentTest1\t=-WixEnvTest1\t\tWixEnvironmentTest", | ||
| 458 | "Environment:WixEnvironmentTest2\t+-WixEnvTest1\t\tWixEnvironmentTest", | ||
| 459 | "Environment:WixEnvironmentTest3\t!-WixEnvTest1\t\tWixEnvironmentTest", | ||
| 460 | "Environment:WixEnvironmentTest4\t=-*WIX\t[INSTALLFOLDER]\tWixEnvironmentTest", | ||
| 461 | }, results); | ||
| 462 | } | ||
| 463 | } | ||
| 464 | |||
| 465 | [Fact] | ||
| 431 | public void PopulatesFeatureTableWithParent() | 466 | public void PopulatesFeatureTableWithParent() |
| 432 | { | 467 | { |
| 433 | var folder = TestData.Get(@"TestData"); | 468 | var folder = TestData.Get(@"TestData"); |
| @@ -942,6 +977,15 @@ namespace WixToolsetTest.CoreIntegration | |||
| 942 | "Upgrade:{12E4699F-E774-4D05-8A01-5BDD41BBA127}\t1.0.0.0\t\t1033\t2\t\tWIX_DOWNGRADE_DETECTED", | 977 | "Upgrade:{12E4699F-E774-4D05-8A01-5BDD41BBA127}\t1.0.0.0\t\t1033\t2\t\tWIX_DOWNGRADE_DETECTED", |
| 943 | "Upgrade:{B05772EA-82B8-4DE0-B7EB-45B5F0CCFE6D}\t1.0.0\t\t\t256\t\tRELPRODFOUND", | 978 | "Upgrade:{B05772EA-82B8-4DE0-B7EB-45B5F0CCFE6D}\t1.0.0\t\t\t256\t\tRELPRODFOUND", |
| 944 | }, results); | 979 | }, results); |
| 980 | |||
| 981 | var prefix = "Property:SecureCustomProperties\t"; | ||
| 982 | var secureProperties = Query.QueryDatabase(msiPath, new[] { "Property" }).Where(p => p.StartsWith(prefix)).Single(); | ||
| 983 | Assert.Equal(new[] | ||
| 984 | { | ||
| 985 | "RELPRODFOUND", | ||
| 986 | "WIX_DOWNGRADE_DETECTED", | ||
| 987 | "WIX_UPGRADE_DETECTED", | ||
| 988 | }, secureProperties.Substring(prefix.Length).Split(';').OrderBy(p => p)); | ||
| 945 | } | 989 | } |
| 946 | } | 990 | } |
| 947 | } | 991 | } |
