From: Stephane Delcroix Date: Wed, 19 Dec 2018 15:14:21 +0000 (+0100) Subject: [Xaml] require escaping curly braces (#4723) X-Git-Tag: accepted/tizen/5.5/unified/20200421.150457~571 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6753ace40e68f8aa6d45eefa90117f5650984c6f;p=platform%2Fcore%2Fcsapi%2Fxsf.git [Xaml] require escaping curly braces (#4723) This is a breaking change as we weren't throwing errors on that before. - fixes #2756 --- diff --git a/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewTemplateGallery.xaml b/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewTemplateGallery.xaml index da35604..b94c268 100644 --- a/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewTemplateGallery.xaml +++ b/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/EmptyViewGalleries/EmptyViewTemplateGallery.xaml @@ -20,7 +20,7 @@ + Text="{Binding Filter, StringFormat='{}Your filter term of {0} did not match any records'}"> diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Gh2756.xaml b/Xamarin.Forms.Xaml.UnitTests/Issues/Gh2756.xaml new file mode 100644 index 0000000..c9259f7 --- /dev/null +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Gh2756.xaml @@ -0,0 +1,7 @@ + + + diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Gh2756.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Gh2756.xaml.cs new file mode 100644 index 0000000..eae564d --- /dev/null +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Gh2756.xaml.cs @@ -0,0 +1,34 @@ +using NUnit.Framework; + +using Xamarin.Forms.Core.UnitTests; + +using Xamarin.Forms; + +namespace Xamarin.Forms.Xaml.UnitTests +{ + [XamlCompilation(XamlCompilationOptions.Skip)] + public partial class Gh2756 : ContentPage + { + public Gh2756() => InitializeComponent(); + public Gh2756(bool useCompiledXaml) + { + //this stub will be replaced at compile time + } + + [TestFixture] + class Tests + { + [SetUp] public void Setup() => Device.PlatformServices = new MockPlatformServices(); + [TearDown] public void TearDown() => Device.PlatformServices = null; + + [Test] + public void UnescapedBraces([Values(false, true)]bool useCompiledXaml) + { + if (useCompiledXaml) + Assert.Throws(() => MockCompiler.Compile(typeof(Gh2756))); + else + Assert.Throws(() => new Gh2756(useCompiledXaml)); + } + } + } +} diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Gh3539.xaml b/Xamarin.Forms.Xaml.UnitTests/Issues/Gh3539.xaml index a6b9da7..90a0b78 100644 --- a/Xamarin.Forms.Xaml.UnitTests/Issues/Gh3539.xaml +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Gh3539.xaml @@ -12,11 +12,11 @@ diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1438.xaml b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1438.xaml index f31c52a..4fb3672 100644 --- a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1438.xaml +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1438.xaml @@ -1,11 +1,11 @@ - +