diff options
author | Rob Mensching <rob@firegiant.com> | 2020-05-22 14:47:36 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2020-05-22 15:25:19 -0700 |
commit | e8030ca17ff96a794a3fecd66bb01b81581a5451 (patch) | |
tree | 6f05c2356882f33b375e2372efecf3d60830686b /src/test | |
parent | d84ed7360adec89569eaab3793e9723f38d2a855 (diff) | |
download | wix-e8030ca17ff96a794a3fecd66bb01b81581a5451.tar.gz wix-e8030ca17ff96a794a3fecd66bb01b81581a5451.tar.bz2 wix-e8030ca17ff96a794a3fecd66bb01b81581a5451.zip |
Fix naming of file in a merge module's cabinet
The file was stored in the merge module's cabinet with plain FileId,
without the modularization GUID. This change fixes the cabinet builder
so that it adds the modularization GUID when creating the cabinet.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index 5af256c1..075f7733 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | |||
@@ -346,15 +346,32 @@ namespace WixToolsetTest.CoreIntegration | |||
346 | 346 | ||
347 | result.AssertSuccess(); | 347 | result.AssertSuccess(); |
348 | 348 | ||
349 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msm"))); | 349 | var msmPath = Path.Combine(intermediateFolder, @"bin\test.msm"); |
350 | Assert.True(File.Exists(msmPath)); | ||
350 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); | 351 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); |
351 | 352 | ||
352 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); | 353 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); |
353 | var section = intermediate.Sections.Single(); | 354 | var section = intermediate.Sections.Single(); |
354 | 355 | ||
355 | var fileTuple = section.Tuples.OfType<FileTuple>().Single(); | 356 | var fileTuple = section.Tuples.OfType<FileTuple>().Single(); |
357 | Assert.Equal("filyIq8rqcxxf903Hsn5K9L0SWV73g", fileTuple.Id.Id); | ||
356 | Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); | 358 | Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); |
357 | Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); | 359 | Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); |
360 | |||
361 | var data = WindowsInstallerData.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); | ||
362 | var fileRows = data.Tables["File"].Rows; | ||
363 | Assert.Equal(new[] | ||
364 | { | ||
365 | "filyIq8rqcxxf903Hsn5K9L0SWV73g.243FB739_4D05_472F_9CFB_EF6B1017B6DE" | ||
366 | }, fileRows.Select(r => r.FieldAsString(0)).ToArray()); | ||
367 | |||
368 | var cabPath = Path.Combine(intermediateFolder, "msm-test.cab"); | ||
369 | Query.ExtractStream(msmPath, "MergeModule.CABinet", cabPath); | ||
370 | var files = Query.GetCabinetFiles(cabPath); | ||
371 | Assert.Equal(new[] | ||
372 | { | ||
373 | "filyIq8rqcxxf903Hsn5K9L0SWV73g.243FB739_4D05_472F_9CFB_EF6B1017B6DE" | ||
374 | }, files.Select(f => Path.Combine(f.Path, f.Name)).ToArray()); | ||
358 | } | 375 | } |
359 | } | 376 | } |
360 | 377 | ||