diff options
| author | Bob Arnson <bob@joyofsetup.com> | 2019-10-31 20:10:49 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2019-10-31 20:18:04 -0400 |
| commit | 8b1861a0d9fc636f02ccb9452946863e31a46b78 (patch) | |
| tree | 74fadf7a22b8fc2ee561db7a3aff425f0b6a2237 /src/test | |
| parent | 28f9377dca4072528685269472e25f76ef0d0a55 (diff) | |
| download | wix-8b1861a0d9fc636f02ccb9452946863e31a46b78.tar.gz wix-8b1861a0d9fc636f02ccb9452946863e31a46b78.tar.bz2 wix-8b1861a0d9fc636f02ccb9452946863e31a46b78.zip | |
Add namespace to <Include> elements.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/WixToolsetTest.Converters/ConverterFixture.cs | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/test/WixToolsetTest.Converters/ConverterFixture.cs b/src/test/WixToolsetTest.Converters/ConverterFixture.cs index 97769cd6..71069333 100644 --- a/src/test/WixToolsetTest.Converters/ConverterFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConverterFixture.cs | |||
| @@ -364,7 +364,7 @@ namespace WixToolsetTest.Converters | |||
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | [Fact] | 366 | [Fact] |
| 367 | public void CanConvertMissingNamespace() | 367 | public void CanConvertMissingWixNamespace() |
| 368 | { | 368 | { |
| 369 | var parse = String.Join(Environment.NewLine, | 369 | var parse = String.Join(Environment.NewLine, |
| 370 | "<?xml version='1.0' encoding='utf-8'?>", | 370 | "<?xml version='1.0' encoding='utf-8'?>", |
| @@ -393,6 +393,35 @@ namespace WixToolsetTest.Converters | |||
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | [Fact] | 395 | [Fact] |
| 396 | public void CanConvertMissingIncludeNamespace() | ||
| 397 | { | ||
| 398 | var parse = String.Join(Environment.NewLine, | ||
| 399 | "<?xml version='1.0' encoding='utf-8'?>", | ||
| 400 | "<Include>", | ||
| 401 | " <?define Version = 1.2.3 ?>", | ||
| 402 | "</Include>"); | ||
| 403 | |||
| 404 | var expected = String.Join(Environment.NewLine, | ||
| 405 | "<?xml version=\"1.0\" encoding=\"utf-16\"?>", | ||
| 406 | "<Include xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | ||
| 407 | " <?define Version = 1.2.3 ?>", | ||
| 408 | "</Include>"); | ||
| 409 | |||
| 410 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); | ||
| 411 | |||
| 412 | var messaging = new DummyMessaging(); | ||
| 413 | var converter = new Wix3Converter(messaging, 2, null, null); | ||
| 414 | |||
| 415 | var errors = converter.ConvertDocument(document); | ||
| 416 | |||
| 417 | var actual = UnformattedDocumentString(document); | ||
| 418 | |||
| 419 | Assert.Equal(1, errors); | ||
| 420 | Assert.Equal(expected, actual); | ||
| 421 | Assert.Equal(Wix4Namespace, document.Root.GetDefaultNamespace()); | ||
| 422 | } | ||
| 423 | |||
| 424 | [Fact] | ||
| 396 | public void CanConvertAnonymousFile() | 425 | public void CanConvertAnonymousFile() |
| 397 | { | 426 | { |
| 398 | var parse = String.Join(Environment.NewLine, | 427 | var parse = String.Join(Environment.NewLine, |
