diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.Converters/ConverterFixture.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Converters/ConverterFixture.cs b/src/test/WixToolsetTest.Converters/ConverterFixture.cs index 39521da0..13df9da7 100644 --- a/src/test/WixToolsetTest.Converters/ConverterFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConverterFixture.cs | |||
@@ -407,5 +407,43 @@ namespace WixToolsetTest.Converters | |||
407 | Assert.Equal(2, errors); | 407 | Assert.Equal(2, errors); |
408 | Assert.Equal(expected, actual); | 408 | Assert.Equal(expected, actual); |
409 | } | 409 | } |
410 | |||
411 | [Fact] | ||
412 | public void CanConvertDeprecatedPrefix() | ||
413 | { | ||
414 | var parse = String.Join(Environment.NewLine, | ||
415 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | ||
416 | "<Fragment>", | ||
417 | "<ComponentGroup Id=\"$(loc.Variable)\" />", | ||
418 | "<ComponentGroup Id=\"$$(loc.Variable)\" />", | ||
419 | "<ComponentGroup Id=\"$$$(loc.Variable)\" />", | ||
420 | "<ComponentGroup Id=\"$$$$(loc.Variable)\" />", | ||
421 | "<ComponentGroup Id=\"$$$$$(loc.Variable)\" />", | ||
422 | "</Fragment>", | ||
423 | "</Wix>"); | ||
424 | |||
425 | var expected = String.Join(Environment.NewLine, | ||
426 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | ||
427 | "<Fragment>", | ||
428 | "<ComponentGroup Id=\"!(loc.Variable)\" />", | ||
429 | "<ComponentGroup Id=\"$$(loc.Variable)\" />", | ||
430 | "<ComponentGroup Id=\"$$!(loc.Variable)\" />", | ||
431 | "<ComponentGroup Id=\"$$$$(loc.Variable)\" />", | ||
432 | "<ComponentGroup Id=\"$$$$!(loc.Variable)\" />", | ||
433 | "</Fragment>", | ||
434 | "</Wix>"); | ||
435 | |||
436 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); | ||
437 | |||
438 | var messaging = new MockMessaging(); | ||
439 | var converter = new WixConverter(messaging, 2, null, null); | ||
440 | |||
441 | var errors = converter.ConvertDocument(document); | ||
442 | |||
443 | var actual = UnformattedDocumentString(document); | ||
444 | |||
445 | Assert.Equal(3, errors); | ||
446 | Assert.Equal(expected, actual); | ||
447 | } | ||
410 | } | 448 | } |
411 | } | 449 | } |