diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-02 18:38:55 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-02 21:34:24 +1000 |
| commit | 302b501f9ed2ae840ce598b30792d0fc1b538572 (patch) | |
| tree | c476955f346c34e0c22c5712d4a1ec9f75499528 /src/test/WixToolsetTest.CoreIntegration | |
| parent | bf435c69fd70f5140eddd99fe02d3dcdae75473a (diff) | |
| download | wix-302b501f9ed2ae840ce598b30792d0fc1b538572.tar.gz wix-302b501f9ed2ae840ce598b30792d0fc1b538572.tar.bz2 wix-302b501f9ed2ae840ce598b30792d0fc1b538572.zip | |
Fix bug in ParseHelper where it assumed the first column was the id column.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs | 2 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs b/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs index 4bc5b535..b75e8ad9 100644 --- a/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/ExtensionFixture.cs | |||
| @@ -63,7 +63,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 63 | Assert.Equal(@"example.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); | 63 | Assert.Equal(@"example.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); |
| 64 | 64 | ||
| 65 | var example = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).Single(); | 65 | var example = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).Single(); |
| 66 | Assert.Equal("Foo", example.Id.Id); | 66 | Assert.Null(example.Id?.Id); |
| 67 | Assert.Equal("Foo", example[0].AsString()); | 67 | Assert.Equal("Foo", example[0].AsString()); |
| 68 | Assert.Equal("Bar", example[1].AsString()); | 68 | Assert.Equal("Bar", example[1].AsString()); |
| 69 | } | 69 | } |
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs index 5f8a278e..c7af6439 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs | |||
| @@ -168,7 +168,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 168 | Assert.Equal(@"example.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); | 168 | Assert.Equal(@"example.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); |
| 169 | 169 | ||
| 170 | var example = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).Single(); | 170 | var example = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).Single(); |
| 171 | Assert.Equal("Foo", example.Id.Id); | 171 | Assert.Null(example.Id?.Id); |
| 172 | Assert.Equal("Foo", example[0].AsString()); | 172 | Assert.Equal("Foo", example[0].AsString()); |
| 173 | Assert.Equal("Bar", example[1].AsString()); | 173 | Assert.Equal("Bar", example[1].AsString()); |
| 174 | } | 174 | } |
| @@ -232,7 +232,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 232 | Assert.Equal(@"other.txt", fileTuples[1][FileTupleFields.Source].PreviousValue.AsPath().Path); | 232 | Assert.Equal(@"other.txt", fileTuples[1][FileTupleFields.Source].PreviousValue.AsPath().Path); |
| 233 | 233 | ||
| 234 | var examples = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).ToArray(); | 234 | var examples = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).ToArray(); |
| 235 | Assert.Equal(new[] { "Foo", "Other" }, examples.Select(t => t.Id.Id).ToArray()); | 235 | Assert.Equal(new string[] { null, null }, examples.Select(t => t.Id?.Id).ToArray()); |
| 236 | Assert.Equal(new[] { "Foo", "Other" }, examples.Select(t => t.AsString(0)).ToArray()); | 236 | Assert.Equal(new[] { "Foo", "Other" }, examples.Select(t => t.AsString(0)).ToArray()); |
| 237 | Assert.Equal(new[] { "Bar", "Value" }, examples.Select(t => t[1].AsString()).ToArray()); | 237 | Assert.Equal(new[] { "Bar", "Value" }, examples.Select(t => t[1].AsString()).ToArray()); |
| 238 | } | 238 | } |
