diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-10-14 23:05:10 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-10-14 23:09:16 -0500 |
| commit | 95188080c8005c01c39bb071459b36f8660bcfcd (patch) | |
| tree | 125463957e98905fe0e6831815b261d9b84f0adc /src/test/WixToolsetTest.CoreIntegration | |
| parent | 313feeabd8c22a38bc1c5247f2e1bded20359ad7 (diff) | |
| download | wix-95188080c8005c01c39bb071459b36f8660bcfcd.tar.gz wix-95188080c8005c01c39bb071459b36f8660bcfcd.tar.bz2 wix-95188080c8005c01c39bb071459b36f8660bcfcd.zip | |
Add failing tests.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration')
4 files changed, 72 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index 5e1e5866..ad1648e6 100644 --- a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
| @@ -244,5 +244,57 @@ namespace WixToolsetTest.CoreIntegration | |||
| 244 | Assert.True(File.Exists(exePath)); | 244 | Assert.True(File.Exists(exePath)); |
| 245 | } | 245 | } |
| 246 | } | 246 | } |
| 247 | |||
| 248 | [Fact(Skip = "Test demonstrates failure")] | ||
| 249 | public void CantBuildWithDuplicateCacheIds() | ||
| 250 | { | ||
| 251 | var folder = TestData.Get(@"TestData"); | ||
| 252 | |||
| 253 | using (var fs = new DisposableFileSystem()) | ||
| 254 | { | ||
| 255 | var baseFolder = fs.GetFolder(); | ||
| 256 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 257 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
| 258 | |||
| 259 | var result = WixRunner.Execute(new[] | ||
| 260 | { | ||
| 261 | "build", | ||
| 262 | Path.Combine(folder, "BadInput", "DuplicateCacheIds.wxs"), | ||
| 263 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 264 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 265 | "-bindpath", Path.Combine(folder, ".Data"), | ||
| 266 | "-intermediateFolder", intermediateFolder, | ||
| 267 | "-o", exePath, | ||
| 268 | }); | ||
| 269 | |||
| 270 | Assert.InRange(result.ExitCode, 2, Int32.MaxValue); | ||
| 271 | } | ||
| 272 | } | ||
| 273 | |||
| 274 | [Fact(Skip = "Test demonstrates failure")] | ||
| 275 | public void CantBuildWithDuplicatePayloadNames() | ||
| 276 | { | ||
| 277 | var folder = TestData.Get(@"TestData"); | ||
| 278 | |||
| 279 | using (var fs = new DisposableFileSystem()) | ||
| 280 | { | ||
| 281 | var baseFolder = fs.GetFolder(); | ||
| 282 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 283 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
| 284 | |||
| 285 | var result = WixRunner.Execute(new[] | ||
| 286 | { | ||
| 287 | "build", | ||
| 288 | Path.Combine(folder, "BadInput", "DuplicatePayloadNames.wxs"), | ||
| 289 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 290 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 291 | "-bindpath", Path.Combine(folder, ".Data"), | ||
| 292 | "-intermediateFolder", intermediateFolder, | ||
| 293 | "-o", exePath, | ||
| 294 | }); | ||
| 295 | |||
| 296 | Assert.InRange(result.ExitCode, 2, Int32.MaxValue); | ||
| 297 | } | ||
| 298 | } | ||
| 247 | } | 299 | } |
| 248 | } | 300 | } |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicateCacheIds.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicateCacheIds.wxs new file mode 100644 index 00000000..5c58ef50 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicateCacheIds.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <PackageGroup Id="BundlePackages"> | ||
| 5 | <ExePackage Id="Manual1" SourceFile="burn.exe" Name="manual1\burn.exe" CacheId="Manual" /> | ||
| 6 | <ExePackage Id="Manual2" SourceFile="burn.exe" Name="manual2\burn.exe" CacheId="Manual" /> | ||
| 7 | </PackageGroup> | ||
| 8 | </Fragment> | ||
| 9 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs new file mode 100644 index 00000000..2d4e8a3c --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <PackageGroup Id="BundlePackages"> | ||
| 5 | <ExePackage Id="Auto1" SourceFile="burn.exe" CacheId="Auto1" /> | ||
| 6 | <ExePackage Id="Auto2" SourceFile="burn.exe" CacheId="Auto2" /> | ||
| 7 | </PackageGroup> | ||
| 8 | </Fragment> | ||
| 9 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index f4aab391..fdb56987 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 24 | <Content Include="TestData\BadEnsureTable\BadEnsureTable.wxs" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\BadEnsureTable\BadEnsureTable.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 25 | <Content Include="TestData\BadInput\BundleVariable.wxs" CopyToOutputDirectory="PreserveNewest" /> | 25 | <Content Include="TestData\BadInput\BundleVariable.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 26 | <Content Include="TestData\BadInput\DuplicateCacheIds.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 27 | <Content Include="TestData\BadInput\DuplicatePayloadNames.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 26 | <Content Include="TestData\BadInput\RegistryKey.wxs" CopyToOutputDirectory="PreserveNewest" /> | 28 | <Content Include="TestData\BadInput\RegistryKey.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 27 | <Content Include="TestData\BindVariables\DefaultedVariable.wxs" CopyToOutputDirectory="PreserveNewest" /> | 29 | <Content Include="TestData\BindVariables\DefaultedVariable.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 28 | <Content Include="TestData\BindVariables\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | 30 | <Content Include="TestData\BindVariables\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> |
