diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-04-08 10:32:40 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-04-08 10:37:00 -0700 |
| commit | 999621b156ae6be4c06205e3e992b2a76dce7926 (patch) | |
| tree | 80c19b663d0a4c3014d6323498676a5d05c52124 /src/test/WixToolsetTest.CoreIntegration/DirectoryFixture.cs | |
| parent | 399ab500b78b0bbd4735cdce560b0f389f2603a0 (diff) | |
| download | wix-999621b156ae6be4c06205e3e992b2a76dce7926.tar.gz wix-999621b156ae6be4c06205e3e992b2a76dce7926.tar.bz2 wix-999621b156ae6be4c06205e3e992b2a76dce7926.zip | |
Re-enable MSI usage of only a "." in Directory/@Name
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/DirectoryFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/DirectoryFixture.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/DirectoryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DirectoryFixture.cs index e0b85509..a61bdff3 100644 --- a/src/test/WixToolsetTest.CoreIntegration/DirectoryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/DirectoryFixture.cs | |||
| @@ -89,6 +89,53 @@ namespace WixToolsetTest.CoreIntegration | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | [Fact] | 91 | [Fact] |
| 92 | public void CanGetDefaultName() | ||
| 93 | { | ||
| 94 | var folder = TestData.Get(@"TestData"); | ||
| 95 | |||
| 96 | using (var fs = new DisposableFileSystem()) | ||
| 97 | { | ||
| 98 | var baseFolder = fs.GetFolder(); | ||
| 99 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 100 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 101 | |||
| 102 | var result = WixRunner.Execute(new[] | ||
| 103 | { | ||
| 104 | "build", | ||
| 105 | Path.Combine(folder, "Directory", "DefaultName.wxs"), | ||
| 106 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 107 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 108 | "-intermediateFolder", intermediateFolder, | ||
| 109 | "-o", msiPath | ||
| 110 | }); | ||
| 111 | |||
| 112 | result.AssertSuccess(); | ||
| 113 | |||
| 114 | var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb")); | ||
| 115 | var section = intermediate.Sections.Single(); | ||
| 116 | |||
| 117 | var dirSymbols = section.Symbols.OfType<WixToolset.Data.Symbols.DirectorySymbol>().ToList(); | ||
| 118 | WixAssert.CompareLineByLine(new[] | ||
| 119 | { | ||
| 120 | "BinFolder\tCompanyFolder\t.", | ||
| 121 | "CompanyFolder\tProgramFilesFolder\tExample Corporation", | ||
| 122 | "ProgramFilesFolder\tTARGETDIR\tPFiles", | ||
| 123 | "TARGETDIR\t\tSourceDir" | ||
| 124 | }, dirSymbols.OrderBy(d => d.Id.Id).Select(d => String.Join('\t', d.Id.Id, d.ParentDirectoryRef, d.Name)).ToArray()); | ||
| 125 | |||
| 126 | var data = WindowsInstallerData.Load(Path.Combine(baseFolder, @"bin\test.wixpdb")); | ||
| 127 | var directoryRows = data.Tables["Directory"].Rows; | ||
| 128 | WixAssert.CompareLineByLine(new[] | ||
| 129 | { | ||
| 130 | "BinFolder\tCompanyFolder\t.", | ||
| 131 | "CompanyFolder\tProgramFilesFolder\tu7-b4gch|Example Corporation", | ||
| 132 | "ProgramFilesFolder\tTARGETDIR\tPFiles", | ||
| 133 | "TARGETDIR\t\tSourceDir" | ||
| 134 | }, directoryRows.Select(r => String.Join('\t', r.FieldAsString(0), r.FieldAsString(1), r.FieldAsString(2))).ToArray()); | ||
| 135 | } | ||
| 136 | } | ||
| 137 | |||
| 138 | [Fact] | ||
| 92 | public void CanGetDuplicateDir() | 139 | public void CanGetDuplicateDir() |
| 93 | { | 140 | { |
| 94 | var folder = TestData.Get(@"TestData"); | 141 | var folder = TestData.Get(@"TestData"); |
