aboutsummaryrefslogtreecommitdiff
path: root/src/test/Example.Extension
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-04-06 14:06:29 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-04-06 14:15:26 +1000
commit59ffa86b7d62ddc52ec813fb65c47f812aeded66 (patch)
treef777a4da178d3cd1127a4c072f505dc9515d9d3c /src/test/Example.Extension
parentfcd88ec3995033bf802f0a637e7fce65e8739006 (diff)
downloadwix-59ffa86b7d62ddc52ec813fb65c47f812aeded66.tar.gz
wix-59ffa86b7d62ddc52ec813fb65c47f812aeded66.tar.bz2
wix-59ffa86b7d62ddc52ec813fb65c47f812aeded66.zip
Try to fix build flakiness with Example.Extension.
Add failing test for the TableDefinition overload of EnsureTable.
Diffstat (limited to 'src/test/Example.Extension')
-rw-r--r--src/test/Example.Extension/Example.Extension.csproj2
-rw-r--r--src/test/Example.Extension/ExampleCompilerExtension.cs10
-rw-r--r--src/test/Example.Extension/ExampleTableDefinitions.cs10
3 files changed, 21 insertions, 1 deletions
diff --git a/src/test/Example.Extension/Example.Extension.csproj b/src/test/Example.Extension/Example.Extension.csproj
index d9ac2509..7f375cb6 100644
--- a/src/test/Example.Extension/Example.Extension.csproj
+++ b/src/test/Example.Extension/Example.Extension.csproj
@@ -33,7 +33,7 @@
33 </ItemGroup> 33 </ItemGroup>
34 </Target> 34 </Target>
35 35
36 <Target Name="BuildExtensionWixlib" AfterTargets="ResolveProjectReferences" DependsOnTargets="SetExtensionWixlib" Inputs="@(ExtensionWxs);$(CompileWixlibExePath)" Outputs="$(WixlibPath)"> 36 <Target Name="BuildExtensionWixlib" AfterTargets="ResolveProjectReferences" DependsOnTargets="ResolveProjectReferences;SetExtensionWixlib" Inputs="@(ExtensionWxs);$(CompileWixlibExePath)" Outputs="$(WixlibPath)">
37 <Exec Command='$(CompileWixlibExePath) "$(IntermediateOutputPath)\" "$(WixlibPath)" "@(ExtensionWxs)"' /> 37 <Exec Command='$(CompileWixlibExePath) "$(IntermediateOutputPath)\" "$(WixlibPath)" "@(ExtensionWxs)"' />
38 </Target> 38 </Target>
39</Project> 39</Project>
diff --git a/src/test/Example.Extension/ExampleCompilerExtension.cs b/src/test/Example.Extension/ExampleCompilerExtension.cs
index e821b7b6..9f0abd4c 100644
--- a/src/test/Example.Extension/ExampleCompilerExtension.cs
+++ b/src/test/Example.Extension/ExampleCompilerExtension.cs
@@ -23,6 +23,10 @@ namespace Example.Extension
23 case "Fragment": 23 case "Fragment":
24 switch (element.Name.LocalName) 24 switch (element.Name.LocalName)
25 { 25 {
26 case "ExampleEnsureTable":
27 this.ParseExampleEnsureTableElement(intermediate, section, element);
28 processed = true;
29 break;
26 case "ExampleSearch": 30 case "ExampleSearch":
27 this.ParseExampleSearchElement(intermediate, section, element); 31 this.ParseExampleSearchElement(intermediate, section, element);
28 processed = true; 32 processed = true;
@@ -93,6 +97,12 @@ namespace Example.Extension
93 } 97 }
94 } 98 }
95 99
100 private void ParseExampleEnsureTableElement(Intermediate intermediate, IntermediateSection section, XElement element)
101 {
102 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
103 this.ParseHelper.EnsureTable(section, sourceLineNumbers, ExampleTableDefinitions.NotInAll);
104 }
105
96 private void ParseExampleSearchElement(Intermediate intermediate, IntermediateSection section, XElement element) 106 private void ParseExampleSearchElement(Intermediate intermediate, IntermediateSection section, XElement element)
97 { 107 {
98 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); 108 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
diff --git a/src/test/Example.Extension/ExampleTableDefinitions.cs b/src/test/Example.Extension/ExampleTableDefinitions.cs
index 124e2406..3532ffc3 100644
--- a/src/test/Example.Extension/ExampleTableDefinitions.cs
+++ b/src/test/Example.Extension/ExampleTableDefinitions.cs
@@ -17,6 +17,16 @@ namespace Example.Extension
17 tupleIdIsPrimaryKey: true 17 tupleIdIsPrimaryKey: true
18 ); 18 );
19 19
20 public static readonly TableDefinition NotInAll = new TableDefinition(
21 "TableDefinitionNotExposedByExtension",
22 new[]
23 {
24 new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier),
25 new ColumnDefinition("Value", ColumnType.String, 0, false, false, ColumnCategory.Formatted),
26 },
27 tupleIdIsPrimaryKey: true
28 );
29
20 public static readonly TableDefinition[] All = new[] { ExampleTable }; 30 public static readonly TableDefinition[] All = new[] { ExampleTable };
21 } 31 }
22} 32}