diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-12 06:51:37 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-12 08:20:50 -0700 |
| commit | 49ce77951ca980848b275cef082309c49b117f47 (patch) | |
| tree | a57e22fef0451b65edf6744440b84af04704c9e7 /src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |
| parent | a82e58ab8a47f4b5d189213da4d7c1dea8437972 (diff) | |
| download | wix-49ce77951ca980848b275cef082309c49b117f47.tar.gz wix-49ce77951ca980848b275cef082309c49b117f47.tar.bz2 wix-49ce77951ca980848b275cef082309c49b117f47.zip | |
Fix custom table column values case in compiler and decompiler
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 179 |
1 files changed, 0 insertions, 179 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 78a8f0a4..70d6612e 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -439,185 +439,6 @@ namespace WixToolsetTest.CoreIntegration | |||
| 439 | } | 439 | } |
| 440 | 440 | ||
| 441 | [Fact] | 441 | [Fact] |
| 442 | public void PopulatesCustomTable1() | ||
| 443 | { | ||
| 444 | var folder = TestData.Get(@"TestData"); | ||
| 445 | |||
| 446 | using (var fs = new DisposableFileSystem()) | ||
| 447 | { | ||
| 448 | var baseFolder = fs.GetFolder(); | ||
| 449 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 450 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 451 | |||
| 452 | var result = WixRunner.Execute(new[] | ||
| 453 | { | ||
| 454 | "build", | ||
| 455 | Path.Combine(folder, "CustomTable", "CustomTable.wxs"), | ||
| 456 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 457 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 458 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 459 | "-intermediateFolder", intermediateFolder, | ||
| 460 | "-o", msiPath | ||
| 461 | }); | ||
| 462 | |||
| 463 | result.AssertSuccess(); | ||
| 464 | |||
| 465 | Assert.True(File.Exists(msiPath)); | ||
| 466 | var results = Query.QueryDatabase(msiPath, new[] { "CustomTable1" }); | ||
| 467 | Assert.Equal(new[] | ||
| 468 | { | ||
| 469 | "CustomTable1:Row1\ttest.txt", | ||
| 470 | "CustomTable1:Row2\ttest.txt", | ||
| 471 | }, results); | ||
| 472 | } | ||
| 473 | } | ||
| 474 | |||
| 475 | [Fact] | ||
| 476 | public void PopulatesCustomTableWithLocalization() | ||
| 477 | { | ||
| 478 | var folder = TestData.Get(@"TestData"); | ||
| 479 | |||
| 480 | using (var fs = new DisposableFileSystem()) | ||
| 481 | { | ||
| 482 | var baseFolder = fs.GetFolder(); | ||
| 483 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 484 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 485 | |||
| 486 | var result = WixRunner.Execute(new[] | ||
| 487 | { | ||
| 488 | "build", | ||
| 489 | Path.Combine(folder, "CustomTable", "LocalizedCustomTable.wxs"), | ||
| 490 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 491 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 492 | "-loc", Path.Combine(folder, "CustomTable", "LocalizedCustomTable.en-us.wxl"), | ||
| 493 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 494 | "-intermediateFolder", intermediateFolder, | ||
| 495 | "-o", msiPath | ||
| 496 | }); | ||
| 497 | |||
| 498 | result.AssertSuccess(); | ||
| 499 | |||
| 500 | Assert.True(File.Exists(msiPath)); | ||
| 501 | var results = Query.QueryDatabase(msiPath, new[] { "CustomTableLocalized" }); | ||
| 502 | Assert.Equal(new[] | ||
| 503 | { | ||
| 504 | "CustomTableLocalized:Row1\tThis is row one", | ||
| 505 | "CustomTableLocalized:Row2\tThis is row two", | ||
| 506 | }, results); | ||
| 507 | } | ||
| 508 | } | ||
| 509 | |||
| 510 | [Fact] | ||
| 511 | public void PopulatesCustomTableWithFilePath() | ||
| 512 | { | ||
| 513 | var folder = TestData.Get(@"TestData"); | ||
| 514 | |||
| 515 | using (var fs = new DisposableFileSystem()) | ||
| 516 | { | ||
| 517 | var baseFolder = fs.GetFolder(); | ||
| 518 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 519 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 520 | |||
| 521 | var result = WixRunner.Execute(new[] | ||
| 522 | { | ||
| 523 | "build", | ||
| 524 | Path.Combine(folder, "CustomTable", "CustomTableWithFile.wxs"), | ||
| 525 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 526 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 527 | "-bindpath", Path.Combine(folder, "CustomTable", "data"), | ||
| 528 | "-intermediateFolder", intermediateFolder, | ||
| 529 | "-o", msiPath | ||
| 530 | }); | ||
| 531 | |||
| 532 | result.AssertSuccess(); | ||
| 533 | |||
| 534 | Assert.True(File.Exists(msiPath)); | ||
| 535 | var results = Query.QueryDatabase(msiPath, new[] { "CustomTableWithFile" }); | ||
| 536 | Assert.Equal(new[] | ||
| 537 | { | ||
| 538 | "CustomTableWithFile:Row1\t[Binary data]", | ||
| 539 | "CustomTableWithFile:Row2\t[Binary data]", | ||
| 540 | }, results); | ||
| 541 | } | ||
| 542 | } | ||
| 543 | |||
| 544 | [Fact] | ||
| 545 | public void PopulatesCustomTableWithFilePathSerialized() | ||
| 546 | { | ||
| 547 | var folder = TestData.Get(@"TestData"); | ||
| 548 | |||
| 549 | using (var fs = new DisposableFileSystem()) | ||
| 550 | { | ||
| 551 | var baseFolder = fs.GetFolder(); | ||
| 552 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 553 | var wixlibPath = Path.Combine(baseFolder, @"bin\test.wixlib"); | ||
| 554 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 555 | |||
| 556 | var result = WixRunner.Execute(new[] | ||
| 557 | { | ||
| 558 | "build", | ||
| 559 | Path.Combine(folder, "CustomTable", "CustomTableWithFile.wxs"), | ||
| 560 | "-bindpath", Path.Combine(folder, "CustomTable", "data"), | ||
| 561 | "-intermediateFolder", intermediateFolder, | ||
| 562 | "-o", wixlibPath | ||
| 563 | }); | ||
| 564 | |||
| 565 | result.AssertSuccess(); | ||
| 566 | |||
| 567 | result = WixRunner.Execute(new[] | ||
| 568 | { | ||
| 569 | "build", | ||
| 570 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 571 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 572 | "-lib", wixlibPath, | ||
| 573 | "-bindpath", Path.Combine(folder, "CustomTable", "data"), | ||
| 574 | "-intermediateFolder", intermediateFolder, | ||
| 575 | "-o", msiPath | ||
| 576 | }); | ||
| 577 | |||
| 578 | result.AssertSuccess(); | ||
| 579 | |||
| 580 | Assert.True(File.Exists(msiPath)); | ||
| 581 | var results = Query.QueryDatabase(msiPath, new[] { "CustomTableWithFile" }); | ||
| 582 | Assert.Equal(new[] | ||
| 583 | { | ||
| 584 | "CustomTableWithFile:Row1\t[Binary data]", | ||
| 585 | "CustomTableWithFile:Row2\t[Binary data]", | ||
| 586 | }, results); | ||
| 587 | } | ||
| 588 | } | ||
| 589 | |||
| 590 | [Fact] | ||
| 591 | public void UnrealCustomTableIsNotPresentInMsi() | ||
| 592 | { | ||
| 593 | var folder = TestData.Get(@"TestData"); | ||
| 594 | |||
| 595 | using (var fs = new DisposableFileSystem()) | ||
| 596 | { | ||
| 597 | var baseFolder = fs.GetFolder(); | ||
| 598 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 599 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 600 | |||
| 601 | var result = WixRunner.Execute(new[] | ||
| 602 | { | ||
| 603 | "build", | ||
| 604 | Path.Combine(folder, "CustomTable", "CustomTable.wxs"), | ||
| 605 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 606 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 607 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 608 | "-intermediateFolder", intermediateFolder, | ||
| 609 | "-o", msiPath | ||
| 610 | }); | ||
| 611 | |||
| 612 | result.AssertSuccess(); | ||
| 613 | |||
| 614 | Assert.True(File.Exists(msiPath)); | ||
| 615 | var results = Query.QueryDatabase(msiPath, new[] { "CustomTable2" }); | ||
| 616 | Assert.Empty(results); | ||
| 617 | } | ||
| 618 | } | ||
| 619 | |||
| 620 | [Fact] | ||
| 621 | public void PopulatesDirectoryTableWithValidDefaultDir() | 442 | public void PopulatesDirectoryTableWithValidDefaultDir() |
| 622 | { | 443 | { |
| 623 | var folder = TestData.Get(@"TestData"); | 444 | var folder = TestData.Get(@"TestData"); |
