diff options
author | Bob Arnson <bob@joyofsetup.com> | 2020-03-05 19:52:35 -0500 |
---|---|---|
committer | Bob Arnson <bob@firegiant.com> | 2020-03-05 20:26:53 -0500 |
commit | 4965ca76323d2ee709bc1790ed1e49ab958445b4 (patch) | |
tree | bf490bc47bdaed031f40a6efdf2178e9bbb761db /src/test | |
parent | 9ba9908cc585296f2b0ed2487351853e1a490005 (diff) | |
download | wix-4965ca76323d2ee709bc1790ed1e49ab958445b4.tar.gz wix-4965ca76323d2ee709bc1790ed1e49ab958445b4.tar.bz2 wix-4965ca76323d2ee709bc1790ed1e49ab958445b4.zip |
Handle versioned extension ids.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.Converters/ConverterFixture.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Converters/ConverterFixture.cs b/src/test/WixToolsetTest.Converters/ConverterFixture.cs index cb70b35a..c6037787 100644 --- a/src/test/WixToolsetTest.Converters/ConverterFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConverterFixture.cs | |||
@@ -590,6 +590,40 @@ namespace WixToolsetTest.Converters | |||
590 | Assert.Equal(expected, actual); | 590 | Assert.Equal(expected, actual); |
591 | } | 591 | } |
592 | 592 | ||
593 | [Fact] | ||
594 | public void CanConvertCustomAction() | ||
595 | { | ||
596 | var parse = String.Join(Environment.NewLine, | ||
597 | "<?xml version='1.0' encoding='utf-8'?>", | ||
598 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | ||
599 | " <CustomAction Id='Foo' BinaryKey='WixCA' DllEntry='CAQuietExec' />", | ||
600 | " <CustomAction Id='Foo' BinaryKey='WixCA_x64' DllEntry='CAQuietExec64' />", | ||
601 | " <CustomAction Id='Foo' BinaryKey='UtilCA' DllEntry='WixQuietExec' />", | ||
602 | " <CustomAction Id='Foo' BinaryKey='UtilCA_x64' DllEntry='WixQuietExec64' />", | ||
603 | "</Wix>"); | ||
604 | |||
605 | var expected = String.Join(Environment.NewLine, | ||
606 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
607 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | ||
608 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X86\" DllEntry=\"WixQuietExec\" />", | ||
609 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X64\" DllEntry=\"WixQuietExec64\" />", | ||
610 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X86\" DllEntry=\"WixQuietExec\" />", | ||
611 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X64\" DllEntry=\"WixQuietExec64\" />", | ||
612 | "</Wix>"); | ||
613 | |||
614 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); | ||
615 | |||
616 | var messaging = new DummyMessaging(); | ||
617 | var converter = new Wix3Converter(messaging, 2, null, null); | ||
618 | |||
619 | var errors = converter.ConvertDocument(document); | ||
620 | |||
621 | var actual = UnformattedDocumentString(document); | ||
622 | |||
623 | Assert.Equal(6, errors); | ||
624 | Assert.Equal(expected, actual); | ||
625 | } | ||
626 | |||
593 | private static string UnformattedDocumentString(XDocument document) | 627 | private static string UnformattedDocumentString(XDocument document) |
594 | { | 628 | { |
595 | var sb = new StringBuilder(); | 629 | var sb = new StringBuilder(); |