forked from xamarin/Xamarin.Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quotes are already parsed, and handled elsewhere - fixes xamarin#12763
- Loading branch information
1 parent
e622481
commit b2a1a82
Showing
3 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Xaml.UnitTests.Gh12763"> | ||
<Label x:Name="label" Text="{Binding ., StringFormat='"{0}"', Source=Foo}" /> | ||
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
using System; | ||
using System.Collections.Generic; | ||
using NUnit.Framework; | ||
using Xamarin.Forms; | ||
using Xamarin.Forms.Core.UnitTests; | ||
|
||
namespace Xamarin.Forms.Xaml.UnitTests | ||
{ | ||
public partial class Gh12763 : ContentPage | ||
{ | ||
public Gh12763() => InitializeComponent(); | ||
public Gh12763(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 QuotesInStringFormat([Values(false, true)] bool useCompiledXaml) | ||
{ | ||
var layout = new Gh12763(useCompiledXaml); | ||
Assert.That(layout.label.Text, Is.EqualTo("\"Foo\"")); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters