Add failing test for TrueType Font.
Sean Hall committed
Nov 7, 2019 at 14:59 UTC
bc085061963069953d609284ab48d16d7e1ccc99
3 files changed
+45
-1
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+34
-1
@@ -403,7 +403,7 @@ namespace WixToolsetTest.CoreIntegration
403
}
404
405
[Fact]
406
- public void PopulatesFontTable()
406
+ public void PopulatesFontTableFromFontTitle()
407
{
408
var folder = TestData.Get(@"TestData");
409
@@ -435,6 +435,39 @@ namespace WixToolsetTest.CoreIntegration
435
}
436
}
437
438
+ [Fact(Skip = "Test demonstrates failure")]
439
+ public void PopulatesFontTableFromTrueType()
440
+ {
441
+ var folder = TestData.Get(@"TestData");
442
+
443
+ using (var fs = new DisposableFileSystem())
444
+ {
445
+ var baseFolder = fs.GetFolder();
446
+ var intermediateFolder = Path.Combine(baseFolder, "obj");
447
+ var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
448
+
449
+ var result = WixRunner.Execute(new[]
450
+ {
451
+ "build",
452
+ Path.Combine(folder, "Font", "TrueType.wxs"),
453
+ Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
454
+ Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
455
+ "-bindpath", Path.Combine(folder, "SingleFile", "data"),
456
+ "-intermediateFolder", intermediateFolder,
457
+ "-o", msiPath
458
+ });
459
+
460
+ result.AssertSuccess();
461
+
462
+ Assert.True(File.Exists(msiPath));
463
+ var results = Query.QueryDatabase(msiPath, new[] { "Font" });
464
+ Assert.Equal(new[]
465
+ {
466
+ "Font:TrueTypeFontComp.ttf\t",
467
+ }, results);
468
+ }
469
+ }
470
+
471
[Fact]
472
public void PopulatesInstallExecuteSequenceTable()
473
{
src/test/WixToolsetTest.CoreIntegration/TestData/Font/TrueType.wxs
new
+10
@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Fragment>
4
+ <ComponentGroup Id="ProductComponents">
5
+ <Component Id="TrueTypeFontComp" Directory="INSTALLFOLDER" Guid="C8116E5E-F731-427C-AF43-6FF8B8D7DA64">
6
+ <File Source="test.txt" Name="TrueTypeFontComp.ttf" TrueType="yes" />
7
+ </Component>
8
+ </ComponentGroup>
9
+ </Fragment>
10
+</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -35,6 +35,7 @@
35
<Content Include="TestData\ErrorsInUI\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
36
<Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
37
<Content Include="TestData\Font\FontTitle.wxs" CopyToOutputDirectory="PreserveNewest" />
38
+ <Content Include="TestData\Font\TrueType.wxs" CopyToOutputDirectory="PreserveNewest" />
39
<Content Include="TestData\Icon\SampleIcon.wxs" CopyToOutputDirectory="PreserveNewest" />
40
<Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" />
41
<Content Include="TestData\SameFileFolders\data\a\test.txt" CopyToOutputDirectory="PreserveNewest" />