|
|
|
@ -443,6 +443,24 @@ namespace Avalonia.Controls.UnitTests |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void SelectedText_NullClearsText() |
|
|
|
{ |
|
|
|
using (UnitTestApplication.Start(Services)) |
|
|
|
{ |
|
|
|
var target = new TextBox |
|
|
|
{ |
|
|
|
Template = CreateTemplate(), |
|
|
|
Text = "0123" |
|
|
|
}; |
|
|
|
target.SelectionStart = 1; |
|
|
|
target.SelectionEnd = 3; |
|
|
|
target.SelectedText = null; |
|
|
|
|
|
|
|
Assert.True(target.Text == "03"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void CoerceCaretIndex_Doesnt_Cause_Exception_with_malformed_line_ending() |
|
|
|
{ |
|
|
|
|