diff options
author | Mike Wileczka <22036740+mwileczka@users.noreply.github.com> | 2023-04-19 10:12:24 -0400 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2023-04-19 09:18:55 -0700 |
commit | 041558eb93368365ca397e16045e01454a603976 (patch) | |
tree | 3de5a5eba3c78a7e102f77611a37530220846e9c /src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs | |
parent | 282576fe225b7673214a167631193a17c2a2ead7 (diff) | |
download | wix-041558eb93368365ca397e16045e01454a603976.tar.gz wix-041558eb93368365ca397e16045e01454a603976.tar.bz2 wix-041558eb93368365ca397e16045e01454a603976.zip |
Fix harvesting project names with invalid chars
Project names with invalid characters, namely spaces, where not being harvested properly. The sanitized name is requires for the `Source="$(var.PROJECT_NAME` output. Updated harvest project unit test for project names with spaces.
Diffstat (limited to 'src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs')
-rw-r--r-- | src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs b/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs index cea76712..a7d46962 100644 --- a/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs +++ b/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs | |||
@@ -200,62 +200,62 @@ namespace WixToolsetTest.Sdk | |||
200 | var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); | 200 | var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); |
201 | WixAssert.StringCollectionEmpty(warnings); | 201 | WixAssert.StringCollectionEmpty(warnings); |
202 | 202 | ||
203 | var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_ToolsVersion4Cs.wxs"); | 203 | var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_Tools Version 4Cs.wxs"); |
204 | Assert.True(File.Exists(generatedFilePath)); | 204 | Assert.True(File.Exists(generatedFilePath)); |
205 | 205 | ||
206 | var generatedContents = File.ReadAllText(generatedFilePath); | 206 | var generatedContents = File.ReadAllText(generatedFilePath); |
207 | var testXml = generatedContents.GetTestXml(); | 207 | var testXml = generatedContents.GetTestXml(); |
208 | WixAssert.StringEqual(@"<Wix>" + | 208 | WixAssert.StringEqual(@"<Wix>" + |
209 | "<Fragment>" + | 209 | "<Fragment>" + |
210 | "<DirectoryRef Id='ToolsVersion4Cs.Binaries'>" + | 210 | "<DirectoryRef Id='Tools_Version_4Cs.Binaries'>" + |
211 | "<Component Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Guid='*'>" + | 211 | "<Component Id='Tools_Version_4Cs.Binaries.Tools_Version_4Cs.dll' Guid='*'>" + |
212 | "<File Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.dll' />" + | 212 | "<File Id='Tools_Version_4Cs.Binaries.Tools_Version_4Cs.dll' Source='$(var.Tools_Version_4Cs.TargetDir)\\Tools Version 4Cs.dll' />" + |
213 | "</Component>" + | 213 | "</Component>" + |
214 | "</DirectoryRef>" + | 214 | "</DirectoryRef>" + |
215 | "</Fragment>" + | 215 | "</Fragment>" + |
216 | "<Fragment>" + | 216 | "<Fragment>" + |
217 | "<ComponentGroup Id='ToolsVersion4Cs.Binaries'>" + | 217 | "<ComponentGroup Id='Tools_Version_4Cs.Binaries'>" + |
218 | "<ComponentRef Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' />" + | 218 | "<ComponentRef Id='Tools_Version_4Cs.Binaries.Tools_Version_4Cs.dll' />" + |
219 | "</ComponentGroup>" + | 219 | "</ComponentGroup>" + |
220 | "</Fragment>" + | 220 | "</Fragment>" + |
221 | "<Fragment>" + | 221 | "<Fragment>" + |
222 | "<DirectoryRef Id='ToolsVersion4Cs.Symbols'>" + | 222 | "<DirectoryRef Id='Tools_Version_4Cs.Symbols'>" + |
223 | "<Component Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Guid='*'>" + | 223 | "<Component Id='Tools_Version_4Cs.Symbols.Tools_Version_4Cs.pdb' Guid='*'>" + |
224 | "<File Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.pdb' />" + | 224 | "<File Id='Tools_Version_4Cs.Symbols.Tools_Version_4Cs.pdb' Source='$(var.Tools_Version_4Cs.TargetDir)\\Tools Version 4Cs.pdb' />" + |
225 | "</Component>" + | 225 | "</Component>" + |
226 | "</DirectoryRef>" + | 226 | "</DirectoryRef>" + |
227 | "</Fragment>" + | 227 | "</Fragment>" + |
228 | "<Fragment>" + | 228 | "<Fragment>" + |
229 | "<ComponentGroup Id='ToolsVersion4Cs.Symbols'>" + | 229 | "<ComponentGroup Id='Tools_Version_4Cs.Symbols'>" + |
230 | "<ComponentRef Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' />" + | 230 | "<ComponentRef Id='Tools_Version_4Cs.Symbols.Tools_Version_4Cs.pdb' />" + |
231 | "</ComponentGroup>" + | 231 | "</ComponentGroup>" + |
232 | "</Fragment>" + | 232 | "</Fragment>" + |
233 | "<Fragment>" + | 233 | "<Fragment>" + |
234 | "<DirectoryRef Id='ToolsVersion4Cs.Sources'>" + | 234 | "<DirectoryRef Id='Tools_Version_4Cs.Sources'>" + |
235 | "<Component Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Guid='*'>" + | 235 | "<Component Id='Tools_Version_4Cs.Sources.Tools_Version_4Cs.csproj' Guid='*'>" + |
236 | "<File Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Source='$(var.ToolsVersion4Cs.ProjectDir)\\ToolsVersion4Cs.csproj' />" + | 236 | "<File Id='Tools_Version_4Cs.Sources.Tools_Version_4Cs.csproj' Source='$(var.Tools_Version_4Cs.ProjectDir)\\Tools Version 4Cs.csproj' />" + |
237 | "</Component>" + | 237 | "</Component>" + |
238 | "<Directory Id='ToolsVersion4Cs.Sources.Properties' Name='Properties'>" + | 238 | "<Directory Id='Tools_Version_4Cs.Sources.Properties' Name='Properties'>" + |
239 | "<Component Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Guid='*'>" + | 239 | "<Component Id='Tools_Version_4Cs.Sources.AssemblyInfo.cs' Guid='*'>" + |
240 | "<File Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Source='$(var.ToolsVersion4Cs.ProjectDir)\\Properties\\AssemblyInfo.cs' />" + | 240 | "<File Id='Tools_Version_4Cs.Sources.AssemblyInfo.cs' Source='$(var.Tools_Version_4Cs.ProjectDir)\\Properties\\AssemblyInfo.cs' />" + |
241 | "</Component>" + | 241 | "</Component>" + |
242 | "</Directory>" + | 242 | "</Directory>" + |
243 | "</DirectoryRef>" + | 243 | "</DirectoryRef>" + |
244 | "</Fragment>" + | 244 | "</Fragment>" + |
245 | "<Fragment>" + | 245 | "<Fragment>" + |
246 | "<ComponentGroup Id='ToolsVersion4Cs.Sources'>" + | 246 | "<ComponentGroup Id='Tools_Version_4Cs.Sources'>" + |
247 | "<ComponentRef Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' />" + | 247 | "<ComponentRef Id='Tools_Version_4Cs.Sources.Tools_Version_4Cs.csproj' />" + |
248 | "<ComponentRef Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' />" + | 248 | "<ComponentRef Id='Tools_Version_4Cs.Sources.AssemblyInfo.cs' />" + |
249 | "</ComponentGroup>" + | 249 | "</ComponentGroup>" + |
250 | "</Fragment>" + | 250 | "</Fragment>" + |
251 | "<Fragment>" + | 251 | "<Fragment>" + |
252 | "<ComponentGroup Id='ToolsVersion4Cs.Content' />" + | 252 | "<ComponentGroup Id='Tools_Version_4Cs.Content' />" + |
253 | "</Fragment>" + | 253 | "</Fragment>" + |
254 | "<Fragment>" + | 254 | "<Fragment>" + |
255 | "<ComponentGroup Id='ToolsVersion4Cs.Satellites' />" + | 255 | "<ComponentGroup Id='Tools_Version_4Cs.Satellites' />" + |
256 | "</Fragment>" + | 256 | "</Fragment>" + |
257 | "<Fragment>" + | 257 | "<Fragment>" + |
258 | "<ComponentGroup Id='ToolsVersion4Cs.Documents' />" + | 258 | "<ComponentGroup Id='Tools_Version_4Cs.Documents' />" + |
259 | "</Fragment>" + | 259 | "</Fragment>" + |
260 | "</Wix>", testXml); | 260 | "</Wix>", testXml); |
261 | 261 | ||
@@ -266,7 +266,7 @@ namespace WixToolsetTest.Sdk | |||
266 | var section = intermediate.Sections.Single(); | 266 | var section = intermediate.Sections.Single(); |
267 | 267 | ||
268 | var fileSymbol = section.Symbols.OfType<FileSymbol>().Single(); | 268 | var fileSymbol = section.Symbols.OfType<FileSymbol>().Single(); |
269 | WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); | 269 | WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "Tools Version 4Cs", "bin", "Release\\\\Tools Version 4Cs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); |
270 | } | 270 | } |
271 | } | 271 | } |
272 | 272 | ||