diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-23 16:43:11 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-23 16:56:04 -0700 |
| commit | acba90f005779fa03ee05c3c87148bb6141ba60e (patch) | |
| tree | 97fb00a86df2a92e8346ebd2f4a239df7d2f166d /src/test | |
| parent | 9c235551b2fb961cf10ecb307c252fd5de377513 (diff) | |
| download | wix-acba90f005779fa03ee05c3c87148bb6141ba60e.tar.gz wix-acba90f005779fa03ee05c3c87148bb6141ba60e.tar.bz2 wix-acba90f005779fa03ee05c3c87148bb6141ba60e.zip | |
Do *not* require XML declaration
Diffstat (limited to 'src/test')
15 files changed, 26 insertions, 95 deletions
diff --git a/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs b/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs index e8eeb459..2cd4119b 100644 --- a/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs +++ b/src/test/WixToolsetTest.Converters/BaseConverterFixture.cs | |||
| @@ -5,6 +5,7 @@ namespace WixToolsetTest.Converters | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.IO; | 6 | using System.IO; |
| 7 | using System.Text; | 7 | using System.Text; |
| 8 | using System.Xml; | ||
| 8 | using System.Xml.Linq; | 9 | using System.Xml.Linq; |
| 9 | using Xunit; | 10 | using Xunit; |
| 10 | 11 | ||
| @@ -15,23 +16,18 @@ namespace WixToolsetTest.Converters | |||
| 15 | var sb = new StringBuilder(); | 16 | var sb = new StringBuilder(); |
| 16 | 17 | ||
| 17 | using (var writer = new StringWriter(sb)) | 18 | using (var writer = new StringWriter(sb)) |
| 19 | using (var xml = XmlWriter.Create(writer, new XmlWriterSettings { OmitXmlDeclaration = true })) | ||
| 18 | { | 20 | { |
| 19 | document.Save(writer, SaveOptions.DisableFormatting); | 21 | document.Save(xml); |
| 20 | } | 22 | } |
| 21 | 23 | ||
| 22 | return sb.ToString(); | 24 | return sb.ToString().TrimStart(); |
| 23 | } | 25 | } |
| 24 | 26 | ||
| 25 | protected static string[] UnformattedDocumentLines(XDocument document) | 27 | protected static string[] UnformattedDocumentLines(XDocument document) |
| 26 | { | 28 | { |
| 27 | var sb = new StringBuilder(); | 29 | var unformatted = UnformattedDocumentString(document); |
| 28 | 30 | return unformatted.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); | |
| 29 | using (var writer = new StringWriter(sb)) | ||
| 30 | { | ||
| 31 | document.Save(writer, SaveOptions.DisableFormatting); | ||
| 32 | } | ||
| 33 | |||
| 34 | return sb.ToString().Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); | ||
| 35 | } | 31 | } |
| 36 | 32 | ||
| 37 | protected static void CompareLineByLine(string[] expectedLines, string[] actualLines) | 33 | protected static void CompareLineByLine(string[] expectedLines, string[] actualLines) |
diff --git a/src/test/WixToolsetTest.Converters/ConditionFixture.cs b/src/test/WixToolsetTest.Converters/ConditionFixture.cs index 6a5ce1f9..804ebe5b 100644 --- a/src/test/WixToolsetTest.Converters/ConditionFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConditionFixture.cs | |||
| @@ -29,7 +29,6 @@ namespace WixToolsetTest.Converters | |||
| 29 | 29 | ||
| 30 | var expected = new[] | 30 | var expected = new[] |
| 31 | { | 31 | { |
| 32 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 33 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 32 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 34 | " <Fragment>", | 33 | " <Fragment>", |
| 35 | " <UI>", | 34 | " <UI>", |
| @@ -70,7 +69,6 @@ namespace WixToolsetTest.Converters | |||
| 70 | 69 | ||
| 71 | var expected = new[] | 70 | var expected = new[] |
| 72 | { | 71 | { |
| 73 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 74 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 72 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 75 | " <Fragment>", | 73 | " <Fragment>", |
| 76 | " <Component Id=\"Comp1\" Directory=\"ApplicationFolder\" Condition=\"1<2\">", | 74 | " <Component Id=\"Comp1\" Directory=\"ApplicationFolder\" Condition=\"1<2\">", |
| @@ -107,7 +105,6 @@ namespace WixToolsetTest.Converters | |||
| 107 | 105 | ||
| 108 | var expected = new[] | 106 | var expected = new[] |
| 109 | { | 107 | { |
| 110 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 111 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 108 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 112 | " <Fragment>", | 109 | " <Fragment>", |
| 113 | " <Feature Id=\"Feature1\">", | 110 | " <Feature Id=\"Feature1\">", |
| @@ -144,7 +141,6 @@ namespace WixToolsetTest.Converters | |||
| 144 | 141 | ||
| 145 | var expected = new[] | 142 | var expected = new[] |
| 146 | { | 143 | { |
| 147 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 148 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 144 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 149 | " <Fragment>", | 145 | " <Fragment>", |
| 150 | " <Launch Condition=\"1<2\" Message=\"Stop the install\" />", | 146 | " <Launch Condition=\"1<2\" Message=\"Stop the install\" />", |
| @@ -168,7 +164,7 @@ namespace WixToolsetTest.Converters | |||
| 168 | public void FixPermissionExCondition() | 164 | public void FixPermissionExCondition() |
| 169 | { | 165 | { |
| 170 | var parse = String.Join(Environment.NewLine, | 166 | var parse = String.Join(Environment.NewLine, |
| 171 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | 167 | "<!-- comment -->", |
| 172 | "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>", | 168 | "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>", |
| 173 | " <Fragment>", | 169 | " <Fragment>", |
| 174 | " <Component Id='Comp1' Guid='*' Directory='ApplicationFolder'>", | 170 | " <Component Id='Comp1' Guid='*' Directory='ApplicationFolder'>", |
| @@ -181,7 +177,7 @@ namespace WixToolsetTest.Converters | |||
| 181 | 177 | ||
| 182 | var expected = new[] | 178 | var expected = new[] |
| 183 | { | 179 | { |
| 184 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | 180 | "<!-- comment -->", |
| 185 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 181 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 186 | " <Fragment>", | 182 | " <Fragment>", |
| 187 | " <Component Id=\"Comp1\" Directory=\"ApplicationFolder\">", | 183 | " <Component Id=\"Comp1\" Directory=\"ApplicationFolder\">", |
| @@ -199,7 +195,7 @@ namespace WixToolsetTest.Converters | |||
| 199 | var converter = new Wix3Converter(messaging, 2, null, null); | 195 | var converter = new Wix3Converter(messaging, 2, null, null); |
| 200 | 196 | ||
| 201 | var errors = converter.ConvertDocument(document); | 197 | var errors = converter.ConvertDocument(document); |
| 202 | Assert.Equal(4, errors); | 198 | Assert.Equal(3, errors); |
| 203 | 199 | ||
| 204 | var actualLines = UnformattedDocumentLines(document); | 200 | var actualLines = UnformattedDocumentLines(document); |
| 205 | CompareLineByLine(expected, actualLines); | 201 | CompareLineByLine(expected, actualLines); |
diff --git a/src/test/WixToolsetTest.Converters/ConverterFixture.cs b/src/test/WixToolsetTest.Converters/ConverterFixture.cs index 3378b804..10029090 100644 --- a/src/test/WixToolsetTest.Converters/ConverterFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConverterFixture.cs | |||
| @@ -13,15 +13,15 @@ namespace WixToolsetTest.Converters | |||
| 13 | private static readonly XNamespace Wix4Namespace = "http://wixtoolset.org/schemas/v4/wxs"; | 13 | private static readonly XNamespace Wix4Namespace = "http://wixtoolset.org/schemas/v4/wxs"; |
| 14 | 14 | ||
| 15 | [Fact] | 15 | [Fact] |
| 16 | public void EnsuresDeclaration() | 16 | public void EnsuresNoDeclaration() |
| 17 | { | 17 | { |
| 18 | var parse = String.Join(Environment.NewLine, | 18 | var parse = String.Join(Environment.NewLine, |
| 19 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 19 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 20 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 20 | " <Fragment />", | 21 | " <Fragment />", |
| 21 | "</Wix>"); | 22 | "</Wix>"); |
| 22 | 23 | ||
| 23 | var expected = String.Join(Environment.NewLine, | 24 | var expected = String.Join(Environment.NewLine, |
| 24 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 25 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 25 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 26 | " <Fragment />", | 26 | " <Fragment />", |
| 27 | "</Wix>"); | 27 | "</Wix>"); |
| @@ -40,27 +40,6 @@ namespace WixToolsetTest.Converters | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | [Fact] | 42 | [Fact] |
| 43 | public void EnsuresUtf8Declaration() | ||
| 44 | { | ||
| 45 | var parse = String.Join(Environment.NewLine, | ||
| 46 | "<?xml version='1.0'?>", | ||
| 47 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | ||
| 48 | " <Fragment />", | ||
| 49 | "</Wix>"); | ||
| 50 | |||
| 51 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); | ||
| 52 | |||
| 53 | var messaging = new MockMessaging(); | ||
| 54 | var converter = new Wix3Converter(messaging, 4, null, null); | ||
| 55 | |||
| 56 | var errors = converter.ConvertDocument(document); | ||
| 57 | |||
| 58 | Assert.Equal(1, errors); | ||
| 59 | Assert.Equal("1.0", document.Declaration.Version); | ||
| 60 | Assert.Equal("utf-8", document.Declaration.Encoding); | ||
| 61 | } | ||
| 62 | |||
| 63 | [Fact] | ||
| 64 | public void CanFixWhitespace() | 43 | public void CanFixWhitespace() |
| 65 | { | 44 | { |
| 66 | var parse = String.Join(Environment.NewLine, | 45 | var parse = String.Join(Environment.NewLine, |
| @@ -74,7 +53,6 @@ namespace WixToolsetTest.Converters | |||
| 74 | "</Wix>"); | 53 | "</Wix>"); |
| 75 | 54 | ||
| 76 | var expected = String.Join(Environment.NewLine, | 55 | var expected = String.Join(Environment.NewLine, |
| 77 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 78 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 56 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 79 | " <Fragment>", | 57 | " <Fragment>", |
| 80 | " <Property Id=\"Prop\" Value=\"Val\" />", | 58 | " <Property Id=\"Prop\" Value=\"Val\" />", |
| @@ -91,7 +69,7 @@ namespace WixToolsetTest.Converters | |||
| 91 | var actual = UnformattedDocumentString(document); | 69 | var actual = UnformattedDocumentString(document); |
| 92 | 70 | ||
| 93 | Assert.Equal(expected, actual); | 71 | Assert.Equal(expected, actual); |
| 94 | Assert.Equal(4, errors); | 72 | Assert.Equal(5, errors); |
| 95 | } | 73 | } |
| 96 | 74 | ||
| 97 | [Fact] | 75 | [Fact] |
| @@ -108,7 +86,6 @@ namespace WixToolsetTest.Converters | |||
| 108 | "</Wix>"); | 86 | "</Wix>"); |
| 109 | 87 | ||
| 110 | var expected = String.Join(Environment.NewLine, | 88 | var expected = String.Join(Environment.NewLine, |
| 111 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 112 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 89 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 113 | " <Fragment>", | 90 | " <Fragment>", |
| 114 | "", | 91 | "", |
| @@ -127,14 +104,13 @@ namespace WixToolsetTest.Converters | |||
| 127 | var actual = UnformattedDocumentString(document); | 104 | var actual = UnformattedDocumentString(document); |
| 128 | 105 | ||
| 129 | Assert.Equal(expected, actual); | 106 | Assert.Equal(expected, actual); |
| 130 | Assert.Equal(3, conversions); | 107 | Assert.Equal(4, conversions); |
| 131 | } | 108 | } |
| 132 | 109 | ||
| 133 | [Fact] | 110 | [Fact] |
| 134 | public void CanConvertWithNewLineAtEndOfFile() | 111 | public void CanConvertWithNewLineAtEndOfFile() |
| 135 | { | 112 | { |
| 136 | var parse = String.Join(Environment.NewLine, | 113 | var parse = String.Join(Environment.NewLine, |
| 137 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 138 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 114 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 139 | " <Fragment>", | 115 | " <Fragment>", |
| 140 | "", | 116 | "", |
| @@ -145,7 +121,6 @@ namespace WixToolsetTest.Converters | |||
| 145 | ""); | 121 | ""); |
| 146 | 122 | ||
| 147 | var expected = String.Join(Environment.NewLine, | 123 | var expected = String.Join(Environment.NewLine, |
| 148 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 149 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 124 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 150 | " <Fragment>", | 125 | " <Fragment>", |
| 151 | "", | 126 | "", |
| @@ -178,7 +153,6 @@ namespace WixToolsetTest.Converters | |||
| 178 | "</Wix>"); | 153 | "</Wix>"); |
| 179 | 154 | ||
| 180 | var expected = String.Join(Environment.NewLine, | 155 | var expected = String.Join(Environment.NewLine, |
| 181 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 182 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 156 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 183 | " <Fragment />", | 157 | " <Fragment />", |
| 184 | "</Wix>"); | 158 | "</Wix>"); |
| @@ -192,7 +166,7 @@ namespace WixToolsetTest.Converters | |||
| 192 | 166 | ||
| 193 | var actual = UnformattedDocumentString(document); | 167 | var actual = UnformattedDocumentString(document); |
| 194 | 168 | ||
| 195 | Assert.Equal(1, errors); | 169 | Assert.Equal(2, errors); |
| 196 | //Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); | 170 | //Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); |
| 197 | Assert.Equal(expected, actual); | 171 | Assert.Equal(expected, actual); |
| 198 | } | 172 | } |
| @@ -207,7 +181,6 @@ namespace WixToolsetTest.Converters | |||
| 207 | "</w:Wix>"); | 181 | "</w:Wix>"); |
| 208 | 182 | ||
| 209 | var expected = String.Join(Environment.NewLine, | 183 | var expected = String.Join(Environment.NewLine, |
| 210 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 211 | "<w:Wix xmlns:w=\"http://wixtoolset.org/schemas/v4/wxs\">", | 184 | "<w:Wix xmlns:w=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 212 | " <w:Fragment />", | 185 | " <w:Fragment />", |
| 213 | "</w:Wix>"); | 186 | "</w:Wix>"); |
| @@ -221,7 +194,7 @@ namespace WixToolsetTest.Converters | |||
| 221 | 194 | ||
| 222 | var actual = UnformattedDocumentString(document); | 195 | var actual = UnformattedDocumentString(document); |
| 223 | 196 | ||
| 224 | Assert.Equal(1, errors); | 197 | Assert.Equal(2, errors); |
| 225 | Assert.Equal(expected, actual); | 198 | Assert.Equal(expected, actual); |
| 226 | Assert.Equal(Wix4Namespace, document.Root.GetNamespaceOfPrefix("w")); | 199 | Assert.Equal(Wix4Namespace, document.Root.GetNamespaceOfPrefix("w")); |
| 227 | } | 200 | } |
| @@ -238,7 +211,6 @@ namespace WixToolsetTest.Converters | |||
| 238 | "</w:Wix>"); | 211 | "</w:Wix>"); |
| 239 | 212 | ||
| 240 | var expected = String.Join(Environment.NewLine, | 213 | var expected = String.Join(Environment.NewLine, |
| 241 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 242 | "<w:Wix xmlns:w=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns=\"http://wixtoolset.org/schemas/v4/wxs/util\">", | 214 | "<w:Wix xmlns:w=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns=\"http://wixtoolset.org/schemas/v4/wxs/util\">", |
| 243 | " <w:Fragment>", | 215 | " <w:Fragment>", |
| 244 | " <Test />", | 216 | " <Test />", |
| @@ -255,7 +227,7 @@ namespace WixToolsetTest.Converters | |||
| 255 | var actual = UnformattedDocumentString(document); | 227 | var actual = UnformattedDocumentString(document); |
| 256 | 228 | ||
| 257 | Assert.Equal(expected, actual); | 229 | Assert.Equal(expected, actual); |
| 258 | Assert.Equal(2, errors); | 230 | Assert.Equal(3, errors); |
| 259 | Assert.Equal(Wix4Namespace, document.Root.GetNamespaceOfPrefix("w")); | 231 | Assert.Equal(Wix4Namespace, document.Root.GetNamespaceOfPrefix("w")); |
| 260 | Assert.Equal("http://wixtoolset.org/schemas/v4/wxs/util", document.Root.GetDefaultNamespace()); | 232 | Assert.Equal("http://wixtoolset.org/schemas/v4/wxs/util", document.Root.GetDefaultNamespace()); |
| 261 | } | 233 | } |
| @@ -270,7 +242,6 @@ namespace WixToolsetTest.Converters | |||
| 270 | "</Wix>"); | 242 | "</Wix>"); |
| 271 | 243 | ||
| 272 | var expected = String.Join(Environment.NewLine, | 244 | var expected = String.Join(Environment.NewLine, |
| 273 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 274 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns:util=\"http://wixtoolset.org/schemas/v4/wxs/util\">", | 245 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns:util=\"http://wixtoolset.org/schemas/v4/wxs/util\">", |
| 275 | " <Fragment />", | 246 | " <Fragment />", |
| 276 | "</Wix>"); | 247 | "</Wix>"); |
| @@ -284,7 +255,7 @@ namespace WixToolsetTest.Converters | |||
| 284 | 255 | ||
| 285 | var actual = UnformattedDocumentString(document); | 256 | var actual = UnformattedDocumentString(document); |
| 286 | 257 | ||
| 287 | Assert.Equal(2, errors); | 258 | Assert.Equal(3, errors); |
| 288 | Assert.Equal(expected, actual); | 259 | Assert.Equal(expected, actual); |
| 289 | Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); | 260 | Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); |
| 290 | } | 261 | } |
| @@ -299,7 +270,6 @@ namespace WixToolsetTest.Converters | |||
| 299 | "</Wix>"); | 270 | "</Wix>"); |
| 300 | 271 | ||
| 301 | var expected = String.Join(Environment.NewLine, | 272 | var expected = String.Join(Environment.NewLine, |
| 302 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 303 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 273 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 304 | " <Fragment />", | 274 | " <Fragment />", |
| 305 | "</Wix>"); | 275 | "</Wix>"); |
| @@ -313,7 +283,7 @@ namespace WixToolsetTest.Converters | |||
| 313 | 283 | ||
| 314 | var actual = UnformattedDocumentString(document); | 284 | var actual = UnformattedDocumentString(document); |
| 315 | 285 | ||
| 316 | Assert.Equal(1, errors); | 286 | Assert.Equal(2, errors); |
| 317 | Assert.Equal(expected, actual); | 287 | Assert.Equal(expected, actual); |
| 318 | Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); | 288 | Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); |
| 319 | } | 289 | } |
| @@ -333,7 +303,6 @@ namespace WixToolsetTest.Converters | |||
| 333 | "</Include>"); | 303 | "</Include>"); |
| 334 | 304 | ||
| 335 | var expected = String.Join(Environment.NewLine, | 305 | var expected = String.Join(Environment.NewLine, |
| 336 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 337 | "<Include xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 306 | "<Include xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 338 | " <?define Version = 1.2.3 ?>", | 307 | " <?define Version = 1.2.3 ?>", |
| 339 | " <Fragment>", | 308 | " <Fragment>", |
| @@ -352,7 +321,7 @@ namespace WixToolsetTest.Converters | |||
| 352 | 321 | ||
| 353 | var actual = UnformattedDocumentString(document); | 322 | var actual = UnformattedDocumentString(document); |
| 354 | 323 | ||
| 355 | Assert.Equal(1, errors); | 324 | Assert.Equal(2, errors); |
| 356 | Assert.Equal(expected, actual); | 325 | Assert.Equal(expected, actual); |
| 357 | Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); | 326 | Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); |
| 358 | } | 327 | } |
| @@ -367,7 +336,6 @@ namespace WixToolsetTest.Converters | |||
| 367 | "</Wix>"); | 336 | "</Wix>"); |
| 368 | 337 | ||
| 369 | var expected = String.Join(Environment.NewLine, | 338 | var expected = String.Join(Environment.NewLine, |
| 370 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 371 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 339 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 372 | " <File Id=\"foo.txt\" Source=\"path\\to\\foo.txt\" />", | 340 | " <File Id=\"foo.txt\" Source=\"path\\to\\foo.txt\" />", |
| 373 | "</Wix>"); | 341 | "</Wix>"); |
| @@ -381,7 +349,7 @@ namespace WixToolsetTest.Converters | |||
| 381 | 349 | ||
| 382 | var actual = UnformattedDocumentString(document); | 350 | var actual = UnformattedDocumentString(document); |
| 383 | 351 | ||
| 384 | Assert.Equal(1, errors); | 352 | Assert.Equal(2, errors); |
| 385 | Assert.Equal(expected, actual); | 353 | Assert.Equal(expected, actual); |
| 386 | } | 354 | } |
| 387 | 355 | ||
| @@ -395,7 +363,6 @@ namespace WixToolsetTest.Converters | |||
| 395 | "</Wix>"); | 363 | "</Wix>"); |
| 396 | 364 | ||
| 397 | var expected = String.Join(Environment.NewLine, | 365 | var expected = String.Join(Environment.NewLine, |
| 398 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 399 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 366 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 400 | " <Directory Name=\"iamshort\" />", | 367 | " <Directory Name=\"iamshort\" />", |
| 401 | "</Wix>"); | 368 | "</Wix>"); |
| @@ -409,7 +376,7 @@ namespace WixToolsetTest.Converters | |||
| 409 | 376 | ||
| 410 | var actual = UnformattedDocumentString(document); | 377 | var actual = UnformattedDocumentString(document); |
| 411 | 378 | ||
| 412 | Assert.Equal(1, errors); | 379 | Assert.Equal(2, errors); |
| 413 | Assert.Equal(expected, actual); | 380 | Assert.Equal(expected, actual); |
| 414 | } | 381 | } |
| 415 | 382 | ||
| @@ -417,13 +384,11 @@ namespace WixToolsetTest.Converters | |||
| 417 | public void CanConvertSuppressSignatureValidationNo() | 384 | public void CanConvertSuppressSignatureValidationNo() |
| 418 | { | 385 | { |
| 419 | var parse = String.Join(Environment.NewLine, | 386 | var parse = String.Join(Environment.NewLine, |
| 420 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 421 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 387 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 422 | " <MsiPackage SuppressSignatureValidation='no' />", | 388 | " <MsiPackage SuppressSignatureValidation='no' />", |
| 423 | "</Wix>"); | 389 | "</Wix>"); |
| 424 | 390 | ||
| 425 | var expected = String.Join(Environment.NewLine, | 391 | var expected = String.Join(Environment.NewLine, |
| 426 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 427 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 392 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 428 | " <MsiPackage EnableSignatureValidation=\"yes\" />", | 393 | " <MsiPackage EnableSignatureValidation=\"yes\" />", |
| 429 | "</Wix>"); | 394 | "</Wix>"); |
| @@ -445,13 +410,11 @@ namespace WixToolsetTest.Converters | |||
| 445 | public void CanConvertSuppressSignatureValidationYes() | 410 | public void CanConvertSuppressSignatureValidationYes() |
| 446 | { | 411 | { |
| 447 | var parse = String.Join(Environment.NewLine, | 412 | var parse = String.Join(Environment.NewLine, |
| 448 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 449 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 413 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 450 | " <Payload SuppressSignatureValidation='yes' />", | 414 | " <Payload SuppressSignatureValidation='yes' />", |
| 451 | "</Wix>"); | 415 | "</Wix>"); |
| 452 | 416 | ||
| 453 | var expected = String.Join(Environment.NewLine, | 417 | var expected = String.Join(Environment.NewLine, |
| 454 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 455 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 418 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 456 | " <Payload />", | 419 | " <Payload />", |
| 457 | "</Wix>"); | 420 | "</Wix>"); |
diff --git a/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs b/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs index d05f8e8f..d4fd1acf 100644 --- a/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs | |||
| @@ -58,7 +58,7 @@ namespace WixToolsetTest.Converters | |||
| 58 | var converter = new Wix3Converter(messaging, 4); | 58 | var converter = new Wix3Converter(messaging, 4); |
| 59 | var errors = converter.ConvertFile(targetFile, true); | 59 | var errors = converter.ConvertFile(targetFile, true); |
| 60 | 60 | ||
| 61 | Assert.Equal(6, errors); | 61 | Assert.Equal(7, errors); |
| 62 | 62 | ||
| 63 | var expected = File.ReadAllText(Path.Combine(folder, afterFileName)).Replace("\r\n", "\n"); | 63 | var expected = File.ReadAllText(Path.Combine(folder, afterFileName)).Replace("\r\n", "\n"); |
| 64 | var actual = File.ReadAllText(targetFile).Replace("\r\n", "\n"); | 64 | var actual = File.ReadAllText(targetFile).Replace("\r\n", "\n"); |
diff --git a/src/test/WixToolsetTest.Converters/CustomActionFixture.cs b/src/test/WixToolsetTest.Converters/CustomActionFixture.cs index 1eab0926..27d45bc6 100644 --- a/src/test/WixToolsetTest.Converters/CustomActionFixture.cs +++ b/src/test/WixToolsetTest.Converters/CustomActionFixture.cs | |||
| @@ -24,7 +24,6 @@ namespace WixToolsetTest.Converters | |||
| 24 | "</Wix>"); | 24 | "</Wix>"); |
| 25 | 25 | ||
| 26 | var expected = String.Join(Environment.NewLine, | 26 | var expected = String.Join(Environment.NewLine, |
| 27 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 28 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 27 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 29 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X86\" DllEntry=\"WixQuietExec\" />", | 28 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X86\" DllEntry=\"WixQuietExec\" />", |
| 30 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X64\" DllEntry=\"WixQuietExec64\" />", | 29 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X64\" DllEntry=\"WixQuietExec64\" />", |
| @@ -41,7 +40,7 @@ namespace WixToolsetTest.Converters | |||
| 41 | 40 | ||
| 42 | var actual = UnformattedDocumentString(document); | 41 | var actual = UnformattedDocumentString(document); |
| 43 | 42 | ||
| 44 | Assert.Equal(6, errors); | 43 | Assert.Equal(7, errors); |
| 45 | Assert.Equal(expected, actual); | 44 | Assert.Equal(expected, actual); |
| 46 | } | 45 | } |
| 47 | 46 | ||
| @@ -60,7 +59,6 @@ namespace WixToolsetTest.Converters | |||
| 60 | "</Wix>"); | 59 | "</Wix>"); |
| 61 | 60 | ||
| 62 | var expected = String.Join(Environment.NewLine, | 61 | var expected = String.Join(Environment.NewLine, |
| 63 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 64 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 62 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 65 | " <CustomAction Id=\"Foo\" Script=\"jscript\" ScriptFile=\"Foo.js\" />", | 63 | " <CustomAction Id=\"Foo\" Script=\"jscript\" ScriptFile=\"Foo.js\" />", |
| 66 | "</Wix>"); | 64 | "</Wix>"); |
| @@ -80,7 +78,7 @@ namespace WixToolsetTest.Converters | |||
| 80 | 78 | ||
| 81 | var actual = UnformattedDocumentString(document); | 79 | var actual = UnformattedDocumentString(document); |
| 82 | 80 | ||
| 83 | Assert.Equal(1, errors); | 81 | Assert.Equal(2, errors); |
| 84 | Assert.Equal(expected, actual); | 82 | Assert.Equal(expected, actual); |
| 85 | 83 | ||
| 86 | var script = File.ReadAllText("Foo.js"); | 84 | var script = File.ReadAllText("Foo.js"); |
diff --git a/src/test/WixToolsetTest.Converters/CustomTableFixture.cs b/src/test/WixToolsetTest.Converters/CustomTableFixture.cs index c09534ee..b61dbb10 100644 --- a/src/test/WixToolsetTest.Converters/CustomTableFixture.cs +++ b/src/test/WixToolsetTest.Converters/CustomTableFixture.cs | |||
| @@ -25,7 +25,6 @@ namespace WixToolsetTest.Converters | |||
| 25 | 25 | ||
| 26 | var expected = new[] | 26 | var expected = new[] |
| 27 | { | 27 | { |
| 28 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 29 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 28 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 30 | " <Fragment>", | 29 | " <Fragment>", |
| 31 | " <CustomTable Id=\"Custom1\">", | 30 | " <CustomTable Id=\"Custom1\">", |
| @@ -64,7 +63,6 @@ namespace WixToolsetTest.Converters | |||
| 64 | 63 | ||
| 65 | var expected = new[] | 64 | var expected = new[] |
| 66 | { | 65 | { |
| 67 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 68 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 66 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 69 | " <Fragment>", | 67 | " <Fragment>", |
| 70 | " <CustomTable Id=\"Custom1\">", | 68 | " <CustomTable Id=\"Custom1\">", |
| @@ -90,7 +88,6 @@ namespace WixToolsetTest.Converters | |||
| 90 | public void FixCustomRowCdataValue() | 88 | public void FixCustomRowCdataValue() |
| 91 | { | 89 | { |
| 92 | var parse = String.Join(Environment.NewLine, | 90 | var parse = String.Join(Environment.NewLine, |
| 93 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 94 | "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>", | 91 | "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>", |
| 95 | " <Fragment>", | 92 | " <Fragment>", |
| 96 | " <CustomTable Id='Custom1'>", | 93 | " <CustomTable Id='Custom1'>", |
| @@ -105,7 +102,6 @@ namespace WixToolsetTest.Converters | |||
| 105 | 102 | ||
| 106 | var expected = new[] | 103 | var expected = new[] |
| 107 | { | 104 | { |
| 108 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 109 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 105 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 110 | " <Fragment>", | 106 | " <Fragment>", |
| 111 | " <CustomTable Id=\"Custom1\">", | 107 | " <CustomTable Id=\"Custom1\">", |
| @@ -121,7 +117,7 @@ namespace WixToolsetTest.Converters | |||
| 121 | var converter = new Wix3Converter(messaging, 2, null, null); | 117 | var converter = new Wix3Converter(messaging, 2, null, null); |
| 122 | 118 | ||
| 123 | var errors = converter.ConvertDocument(document); | 119 | var errors = converter.ConvertDocument(document); |
| 124 | Assert.Equal(3, errors); | 120 | Assert.Equal(2, errors); |
| 125 | 121 | ||
| 126 | var actualLines = UnformattedDocumentLines(document); | 122 | var actualLines = UnformattedDocumentLines(document); |
| 127 | CompareLineByLine(expected, actualLines); | 123 | CompareLineByLine(expected, actualLines); |
| @@ -142,7 +138,6 @@ namespace WixToolsetTest.Converters | |||
| 142 | 138 | ||
| 143 | var expected = new[] | 139 | var expected = new[] |
| 144 | { | 140 | { |
| 145 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 146 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 141 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 147 | " <Fragment>", | 142 | " <Fragment>", |
| 148 | " <CustomTable Id=\"Custom1\">", | 143 | " <CustomTable Id=\"Custom1\">", |
| @@ -168,13 +163,11 @@ namespace WixToolsetTest.Converters | |||
| 168 | public void CanConvertCustomTableBootstrapperApplicationData() | 163 | public void CanConvertCustomTableBootstrapperApplicationData() |
| 169 | { | 164 | { |
| 170 | var parse = String.Join(Environment.NewLine, | 165 | var parse = String.Join(Environment.NewLine, |
| 171 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 172 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 166 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 173 | " <CustomTable Id='FgAppx' BootstrapperApplicationData='yes' />", | 167 | " <CustomTable Id='FgAppx' BootstrapperApplicationData='yes' />", |
| 174 | "</Wix>"); | 168 | "</Wix>"); |
| 175 | 169 | ||
| 176 | var expected = String.Join(Environment.NewLine, | 170 | var expected = String.Join(Environment.NewLine, |
| 177 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 178 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 171 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 179 | " <CustomTable Id=\"FgAppx\" Unreal=\"yes\" />", | 172 | " <CustomTable Id=\"FgAppx\" Unreal=\"yes\" />", |
| 180 | "</Wix>"); | 173 | "</Wix>"); |
diff --git a/src/test/WixToolsetTest.Converters/PropertyFixture.cs b/src/test/WixToolsetTest.Converters/PropertyFixture.cs index 0449fb43..90c1e5c9 100644 --- a/src/test/WixToolsetTest.Converters/PropertyFixture.cs +++ b/src/test/WixToolsetTest.Converters/PropertyFixture.cs | |||
| @@ -14,7 +14,6 @@ namespace WixToolsetTest.Converters | |||
| 14 | public void CanFixCdataWhitespace() | 14 | public void CanFixCdataWhitespace() |
| 15 | { | 15 | { |
| 16 | var parse = String.Join(Environment.NewLine, | 16 | var parse = String.Join(Environment.NewLine, |
| 17 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 18 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 17 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 19 | " <Fragment>", | 18 | " <Fragment>", |
| 20 | " <Property Id='Prop'>", | 19 | " <Property Id='Prop'>", |
| @@ -24,7 +23,6 @@ namespace WixToolsetTest.Converters | |||
| 24 | "</Wix>"); | 23 | "</Wix>"); |
| 25 | 24 | ||
| 26 | var expected = String.Join(Environment.NewLine, | 25 | var expected = String.Join(Environment.NewLine, |
| 27 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 28 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 26 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 29 | " <Fragment>", | 27 | " <Fragment>", |
| 30 | " <Property Id=\"Prop\" Value=\"1<2\" />", | 28 | " <Property Id=\"Prop\" Value=\"1<2\" />", |
| @@ -48,7 +46,6 @@ namespace WixToolsetTest.Converters | |||
| 48 | public void CanFixCdataWithWhitespace() | 46 | public void CanFixCdataWithWhitespace() |
| 49 | { | 47 | { |
| 50 | var parse = String.Join(Environment.NewLine, | 48 | var parse = String.Join(Environment.NewLine, |
| 51 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 52 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 49 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 53 | " <Fragment>", | 50 | " <Fragment>", |
| 54 | " <Property Id='Prop'>", | 51 | " <Property Id='Prop'>", |
| @@ -60,7 +57,6 @@ namespace WixToolsetTest.Converters | |||
| 60 | "</Wix>"); | 57 | "</Wix>"); |
| 61 | 58 | ||
| 62 | var expected = String.Join(Environment.NewLine, | 59 | var expected = String.Join(Environment.NewLine, |
| 63 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 64 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 60 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 65 | " <Fragment>", | 61 | " <Fragment>", |
| 66 | " <Property Id=\"Prop\" Value=\"1<2\" />", | 62 | " <Property Id=\"Prop\" Value=\"1<2\" />", |
| @@ -84,7 +80,6 @@ namespace WixToolsetTest.Converters | |||
| 84 | public void CanKeepCdataWithOnlyWhitespace() | 80 | public void CanKeepCdataWithOnlyWhitespace() |
| 85 | { | 81 | { |
| 86 | var parse = String.Join(Environment.NewLine, | 82 | var parse = String.Join(Environment.NewLine, |
| 87 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 88 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", | 83 | "<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>", |
| 89 | " <Fragment>", | 84 | " <Fragment>", |
| 90 | " <Property Id='Prop'><![CDATA[ ]]></Property>", | 85 | " <Property Id='Prop'><![CDATA[ ]]></Property>", |
| @@ -92,7 +87,6 @@ namespace WixToolsetTest.Converters | |||
| 92 | "</Wix>"); | 87 | "</Wix>"); |
| 93 | 88 | ||
| 94 | var expected = String.Join(Environment.NewLine, | 89 | var expected = String.Join(Environment.NewLine, |
| 95 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 96 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 90 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 97 | " <Fragment>", | 91 | " <Fragment>", |
| 98 | " <Property Id=\"Prop\" Value=\" \" />", | 92 | " <Property Id=\"Prop\" Value=\" \" />", |
diff --git a/src/test/WixToolsetTest.Converters/SequenceFixture.cs b/src/test/WixToolsetTest.Converters/SequenceFixture.cs index 997dcd6a..1abe6c0c 100644 --- a/src/test/WixToolsetTest.Converters/SequenceFixture.cs +++ b/src/test/WixToolsetTest.Converters/SequenceFixture.cs | |||
| @@ -14,7 +14,6 @@ namespace WixToolsetTest.Converters | |||
| 14 | public void FixCondition() | 14 | public void FixCondition() |
| 15 | { | 15 | { |
| 16 | var parse = String.Join(Environment.NewLine, | 16 | var parse = String.Join(Environment.NewLine, |
| 17 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 18 | "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>", | 17 | "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>", |
| 19 | " <Fragment>", | 18 | " <Fragment>", |
| 20 | " <InstallUISequence>", | 19 | " <InstallUISequence>", |
| @@ -25,7 +24,6 @@ namespace WixToolsetTest.Converters | |||
| 25 | 24 | ||
| 26 | var expected = new[] | 25 | var expected = new[] |
| 27 | { | 26 | { |
| 28 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 29 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 27 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 30 | " <Fragment>", | 28 | " <Fragment>", |
| 31 | " <InstallUISequence>", | 29 | " <InstallUISequence>", |
| @@ -41,7 +39,7 @@ namespace WixToolsetTest.Converters | |||
| 41 | var converter = new Wix3Converter(messaging, 2, null, null); | 39 | var converter = new Wix3Converter(messaging, 2, null, null); |
| 42 | 40 | ||
| 43 | var errors = converter.ConvertDocument(document); | 41 | var errors = converter.ConvertDocument(document); |
| 44 | Assert.Equal(3, errors); | 42 | Assert.Equal(2, errors); |
| 45 | 43 | ||
| 46 | var actualLines = UnformattedDocumentLines(document); | 44 | var actualLines = UnformattedDocumentLines(document); |
| 47 | CompareLineByLine(expected, actualLines); | 45 | CompareLineByLine(expected, actualLines); |
diff --git a/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v3.wxs b/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v3.wxs index 0e241544..9a739052 100644 --- a/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v3.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v3.wxs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> | 1 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> |
| 3 | <Fragment> | 2 | <Fragment> |
| 4 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> |
diff --git a/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v4_expected.wxs b/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v4_expected.wxs index 375b70d3..6bf3c1ea 100644 --- a/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v4_expected.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/PermissionEx/v4_expected.wxs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> |
| 3 | <Fragment> | 2 | <Fragment> |
| 4 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> |
diff --git a/src/test/WixToolsetTest.Converters/TestData/Preprocessor/ConvertedPreprocessor.wxs b/src/test/WixToolsetTest.Converters/TestData/Preprocessor/ConvertedPreprocessor.wxs index 72c78653..ea52c71f 100644 --- a/src/test/WixToolsetTest.Converters/TestData/Preprocessor/ConvertedPreprocessor.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/Preprocessor/ConvertedPreprocessor.wxs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 3 | 2 | ||
| 4 | 3 | ||
diff --git a/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v3.wxs b/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v3.wxs index b0630f65..b0fcf9c9 100644 --- a/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v3.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v3.wxs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 3 | 2 | ||
| 4 | 3 | ||
diff --git a/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs b/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs index 20a5b1d0..02a06cff 100644 --- a/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 3 | 2 | ||
| 4 | 3 | ||
diff --git a/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs b/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs index cb42ea7d..00ce8461 100644 --- a/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 3 | 2 | ||
| 4 | 3 | ||
diff --git a/src/test/WixToolsetTest.Converters/TestData/SingleFile/ConvertedSingleFile.wxs b/src/test/WixToolsetTest.Converters/TestData/SingleFile/ConvertedSingleFile.wxs index 0c4fd1fb..ec4d84d5 100644 --- a/src/test/WixToolsetTest.Converters/TestData/SingleFile/ConvertedSingleFile.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/SingleFile/ConvertedSingleFile.wxs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 3 | 2 | ||
| 4 | 3 | ||
