|
@@ -84,9 +84,9 @@ namespace Terminal.Gui.Views {
|
|
{
|
|
{
|
|
_textField.SelectedStart = 19;
|
|
_textField.SelectedStart = 19;
|
|
_textField.CursorPosition = 12;
|
|
_textField.CursorPosition = 12;
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x75, new KeyModifiers ())); // u
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x75, new KeyModifiers ())); // u
|
|
- Assert.Equal ("TAB to jump u text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump u text fields.", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -588,13 +588,13 @@ namespace Terminal.Gui.Views {
|
|
_textField.CursorPosition = 24;
|
|
_textField.CursorPosition = 24;
|
|
_textField.Copy ();
|
|
_textField.Copy ();
|
|
Assert.Equal ("text", _textField.SelectedText);
|
|
Assert.Equal ("text", _textField.SelectedText);
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.Paste ();
|
|
_textField.Paste ();
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.SelectedStart = 20;
|
|
_textField.SelectedStart = 20;
|
|
_textField.Cut ();
|
|
_textField.Cut ();
|
|
_textField.Paste ();
|
|
_textField.Paste ();
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -605,17 +605,17 @@ namespace Terminal.Gui.Views {
|
|
_textField.CursorPosition = 24;
|
|
_textField.CursorPosition = 24;
|
|
_textField.Copy ();
|
|
_textField.Copy ();
|
|
Assert.Equal ("text", _textField.SelectedText);
|
|
Assert.Equal ("text", _textField.SelectedText);
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.SelectedStart = -1;
|
|
_textField.SelectedStart = -1;
|
|
_textField.Paste ();
|
|
_textField.Paste ();
|
|
- Assert.Equal ("TAB to jump between texttext fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between texttext fields.", _textField.Text.ToString ());
|
|
_textField.SelectedStart = 24;
|
|
_textField.SelectedStart = 24;
|
|
_textField.Cut ();
|
|
_textField.Cut ();
|
|
Assert.Null (_textField.SelectedText);
|
|
Assert.Null (_textField.SelectedText);
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.SelectedStart = -1;
|
|
_textField.SelectedStart = -1;
|
|
_textField.Paste ();
|
|
_textField.Paste ();
|
|
- Assert.Equal ("TAB to jump between texttext fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between texttext fields.", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -662,10 +662,10 @@ namespace Terminal.Gui.Views {
|
|
};
|
|
};
|
|
|
|
|
|
_textField.Text = "changing";
|
|
_textField.Text = "changing";
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
cancel = false;
|
|
cancel = false;
|
|
_textField.Text = "changing";
|
|
_textField.Text = "changing";
|
|
- Assert.Equal ("changing", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("changing", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -677,7 +677,7 @@ namespace Terminal.Gui.Views {
|
|
};
|
|
};
|
|
|
|
|
|
_textField.Text = "changed";
|
|
_textField.Text = "changed";
|
|
- Assert.Equal ("changed", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("changed", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -685,15 +685,15 @@ namespace Terminal.Gui.Views {
|
|
public void Used_Is_True_By_Default ()
|
|
public void Used_Is_True_By_Default ()
|
|
{
|
|
{
|
|
_textField.CursorPosition = 10;
|
|
_textField.CursorPosition = 10;
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x75, new KeyModifiers ())); // u
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x75, new KeyModifiers ())); // u
|
|
- Assert.Equal ("TAB to jumup between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumup between text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x73, new KeyModifiers ())); // s
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x73, new KeyModifiers ())); // s
|
|
- Assert.Equal ("TAB to jumusp between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumusp between text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x65, new KeyModifiers ())); // e
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x65, new KeyModifiers ())); // e
|
|
- Assert.Equal ("TAB to jumusep between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumusep between text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x64, new KeyModifiers ())); // d
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x64, new KeyModifiers ())); // d
|
|
- Assert.Equal ("TAB to jumusedp between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumusedp between text fields.", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -702,15 +702,15 @@ namespace Terminal.Gui.Views {
|
|
{
|
|
{
|
|
_textField.Used = false;
|
|
_textField.Used = false;
|
|
_textField.CursorPosition = 10;
|
|
_textField.CursorPosition = 10;
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x75, new KeyModifiers ())); // u
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x75, new KeyModifiers ())); // u
|
|
- Assert.Equal ("TAB to jumu between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumu between text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x73, new KeyModifiers ())); // s
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x73, new KeyModifiers ())); // s
|
|
- Assert.Equal ("TAB to jumusbetween text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumusbetween text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x65, new KeyModifiers ())); // e
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x65, new KeyModifiers ())); // e
|
|
- Assert.Equal ("TAB to jumuseetween text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumuseetween text fields.", _textField.Text.ToString ());
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x64, new KeyModifiers ())); // d
|
|
_textField.ProcessKey (new KeyEvent ((Key)0x64, new KeyModifiers ())); // d
|
|
- Assert.Equal ("TAB to jumusedtween text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jumusedtween text fields.", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -718,22 +718,22 @@ namespace Terminal.Gui.Views {
|
|
{
|
|
{
|
|
var tf = new TextField ("ABC");
|
|
var tf = new TextField ("ABC");
|
|
tf.EnsureFocus ();
|
|
tf.EnsureFocus ();
|
|
- Assert.Equal ("ABC", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("ABC", tf.Text.ToString ());
|
|
Assert.Equal (3, tf.CursorPosition);
|
|
Assert.Equal (3, tf.CursorPosition);
|
|
|
|
|
|
// now delete the C
|
|
// now delete the C
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
- Assert.Equal ("AB", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("AB", tf.Text.ToString ());
|
|
Assert.Equal (2, tf.CursorPosition);
|
|
Assert.Equal (2, tf.CursorPosition);
|
|
|
|
|
|
// then delete the B
|
|
// then delete the B
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
- Assert.Equal ("A", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("A", tf.Text.ToString ());
|
|
Assert.Equal (1, tf.CursorPosition);
|
|
Assert.Equal (1, tf.CursorPosition);
|
|
|
|
|
|
// then delete the A
|
|
// then delete the A
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
- Assert.Equal ("", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("", tf.Text.ToString ());
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -743,24 +743,24 @@ namespace Terminal.Gui.Views {
|
|
var tf = new TextField ("ABC");
|
|
var tf = new TextField ("ABC");
|
|
tf.EnsureFocus ();
|
|
tf.EnsureFocus ();
|
|
tf.CursorPosition = 2;
|
|
tf.CursorPosition = 2;
|
|
- Assert.Equal ("ABC", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("ABC", tf.Text.ToString ());
|
|
|
|
|
|
// now delete the B
|
|
// now delete the B
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
- Assert.Equal ("AC", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("AC", tf.Text.ToString ());
|
|
|
|
|
|
// then delete the A
|
|
// then delete the A
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
- Assert.Equal ("C", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("C", tf.Text.ToString ());
|
|
|
|
|
|
// then delete nothing
|
|
// then delete nothing
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
- Assert.Equal ("C", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("C", tf.Text.ToString ());
|
|
|
|
|
|
// now delete the C
|
|
// now delete the C
|
|
tf.CursorPosition = 1;
|
|
tf.CursorPosition = 1;
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
- Assert.Equal ("", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("", tf.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -769,19 +769,19 @@ namespace Terminal.Gui.Views {
|
|
var tf = new TextField ();
|
|
var tf = new TextField ();
|
|
tf.EnsureFocus ();
|
|
tf.EnsureFocus ();
|
|
tf.ProcessKey (new KeyEvent (Key.A, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.A, new KeyModifiers ()));
|
|
- Assert.Equal ("A", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("A", tf.Text.ToString ());
|
|
|
|
|
|
// cancel the next keystroke
|
|
// cancel the next keystroke
|
|
tf.TextChanging += (e) => e.Cancel = e.NewText == "AB";
|
|
tf.TextChanging += (e) => e.Cancel = e.NewText == "AB";
|
|
tf.ProcessKey (new KeyEvent (Key.B, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.B, new KeyModifiers ()));
|
|
|
|
|
|
// B was canceled so should just be A
|
|
// B was canceled so should just be A
|
|
- Assert.Equal ("A", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("A", tf.Text.ToString ());
|
|
|
|
|
|
// now delete the A
|
|
// now delete the A
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ()));
|
|
|
|
|
|
- Assert.Equal ("", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("", tf.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -789,11 +789,11 @@ namespace Terminal.Gui.Views {
|
|
public void Text_Replaces_Tabs_With_Empty_String ()
|
|
public void Text_Replaces_Tabs_With_Empty_String ()
|
|
{
|
|
{
|
|
_textField.Text = "\t\tTAB to jump between text fields.";
|
|
_textField.Text = "\t\tTAB to jump between text fields.";
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
_textField.Text = "";
|
|
_textField.Text = "";
|
|
Clipboard.Contents = "\t\tTAB to jump between text fields.";
|
|
Clipboard.Contents = "\t\tTAB to jump between text fields.";
|
|
_textField.Paste ();
|
|
_textField.Paste ();
|
|
- Assert.Equal ("TAB to jump between text fields.", _textField.Text);
|
|
|
|
|
|
+ Assert.Equal ("TAB to jump between text fields.", _textField.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -901,201 +901,201 @@ namespace Terminal.Gui.Views {
|
|
Assert.False (tf.ReadOnly);
|
|
Assert.False (tf.ReadOnly);
|
|
|
|
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar, new KeyModifiers ())));
|
|
- Assert.Equal ("This is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("This is a test.", tf.Text.ToString ());
|
|
tf.CursorPosition = 0;
|
|
tf.CursorPosition = 0;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar, new KeyModifiers ())));
|
|
- Assert.Equal ("his is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("his is a test.", tf.Text.ToString ());
|
|
tf.ReadOnly = true;
|
|
tf.ReadOnly = true;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.D | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.D | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("his is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("his is a test.", tf.Text.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Delete, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Delete, new KeyModifiers ())));
|
|
- Assert.Equal ("his is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("his is a test.", tf.Text.ToString ());
|
|
tf.ReadOnly = false;
|
|
tf.ReadOnly = false;
|
|
tf.CursorPosition = 1;
|
|
tf.CursorPosition = 1;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home | Key.ShiftMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home | Key.ShiftMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is is", tf.SelectedText);
|
|
Assert.Equal ("is is", tf.SelectedText);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is is", tf.SelectedText);
|
|
Assert.Equal ("is is", tf.SelectedText);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.A | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.A | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is is", tf.SelectedText);
|
|
Assert.Equal ("is is", tf.SelectedText);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End | Key.ShiftMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End | Key.ShiftMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (" a test.", tf.SelectedText);
|
|
Assert.Equal (" a test.", tf.SelectedText);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (" a test.", tf.SelectedText);
|
|
Assert.Equal (" a test.", tf.SelectedText);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.E | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.E | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (" a test.", tf.SelectedText);
|
|
Assert.Equal (" a test.", tf.SelectedText);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Home | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.A | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.A | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
tf.CursorPosition = 5;
|
|
tf.CursorPosition = 5;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.ShiftMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.ShiftMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("s", tf.SelectedText);
|
|
Assert.Equal ("s", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorUp | Key.ShiftMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorUp | Key.ShiftMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is", tf.SelectedText);
|
|
Assert.Equal ("is", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight | Key.ShiftMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight | Key.ShiftMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("s", tf.SelectedText);
|
|
Assert.Equal ("s", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorDown | Key.ShiftMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorDown | Key.ShiftMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
tf.CursorPosition = 7;
|
|
tf.CursorPosition = 7;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("a", tf.SelectedText);
|
|
Assert.Equal ("a", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorUp | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorUp | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is a", tf.SelectedText);
|
|
Assert.Equal ("is a", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'B' + Key.ShiftMask | Key.AltMask), new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'B' + Key.ShiftMask | Key.AltMask), new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is is a", tf.SelectedText);
|
|
Assert.Equal ("is is a", tf.SelectedText);
|
|
tf.CursorPosition = 3;
|
|
tf.CursorPosition = 3;
|
|
tf.SelectedStart = -1;
|
|
tf.SelectedStart = -1;
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is ", tf.SelectedText);
|
|
Assert.Equal ("is ", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorDown | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorDown | Key.ShiftMask | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is a ", tf.SelectedText);
|
|
Assert.Equal ("is a ", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'F' + Key.ShiftMask | Key.AltMask), new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'F' + Key.ShiftMask | Key.AltMask), new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal ("is a test.", tf.SelectedText);
|
|
Assert.Equal ("is a test.", tf.SelectedText);
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Null (tf.SelectedText);
|
|
Assert.Equal (12, tf.CursorPosition);
|
|
Assert.Equal (12, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (11, tf.CursorPosition);
|
|
Assert.Equal (11, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
tf.CursorPosition = 0;
|
|
tf.CursorPosition = 0;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.End | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
tf.CursorPosition = 0;
|
|
tf.CursorPosition = 0;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.E | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.E | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
Assert.Equal (13, tf.CursorPosition);
|
|
tf.CursorPosition = 0;
|
|
tf.CursorPosition = 0;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (1, tf.CursorPosition);
|
|
Assert.Equal (1, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.F | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.F | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.Equal (2, tf.CursorPosition);
|
|
Assert.Equal (2, tf.CursorPosition);
|
|
tf.CursorPosition = 9;
|
|
tf.CursorPosition = 9;
|
|
tf.ReadOnly = true;
|
|
tf.ReadOnly = true;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.K | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.K | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
tf.ReadOnly = false;
|
|
tf.ReadOnly = false;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.K | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.K | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
- Assert.Equal ("est.", Clipboard.Contents);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
|
|
+ Assert.Equal ("est.", Clipboard.Contents.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Z | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Z | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Y | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Y | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace | Key.AltMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace | Key.AltMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a test.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a test.", tf.Text.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Y | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Y | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.Equal (8, tf.CursorPosition);
|
|
Assert.Equal (8, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorUp | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorUp | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.Equal (6, tf.CursorPosition);
|
|
Assert.Equal (6, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'B' + Key.AltMask), new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'B' + Key.AltMask), new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.Equal (3, tf.CursorPosition);
|
|
Assert.Equal (3, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorRight | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.Equal (6, tf.CursorPosition);
|
|
Assert.Equal (6, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorDown | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.CursorDown | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.Equal (8, tf.CursorPosition);
|
|
Assert.Equal (8, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'F' + Key.AltMask), new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent ((Key)((int)'F' + Key.AltMask), new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.Equal (9, tf.CursorPosition);
|
|
Assert.Equal (9, tf.CursorPosition);
|
|
Assert.True (tf.Used);
|
|
Assert.True (tf.Used);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.InsertChar, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.InsertChar, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
Assert.Equal (9, tf.CursorPosition);
|
|
Assert.Equal (9, tf.CursorPosition);
|
|
Assert.False (tf.Used);
|
|
Assert.False (tf.Used);
|
|
tf.SelectedStart = 3;
|
|
tf.SelectedStart = 3;
|
|
tf.CursorPosition = 7;
|
|
tf.CursorPosition = 7;
|
|
Assert.Equal ("is a", tf.SelectedText);
|
|
Assert.Equal ("is a", tf.SelectedText);
|
|
- Assert.Equal ("est.", Clipboard.Contents);
|
|
|
|
|
|
+ Assert.Equal ("est.", Clipboard.Contents.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.C | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.C | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
- Assert.Equal ("is a", Clipboard.Contents);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
|
|
+ Assert.Equal ("is a", Clipboard.Contents.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.X | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.X | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is t", tf.Text);
|
|
|
|
- Assert.Equal ("is a", Clipboard.Contents);
|
|
|
|
|
|
+ Assert.Equal ("is t", tf.Text.ToString ());
|
|
|
|
+ Assert.Equal ("is a", Clipboard.Contents.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.V | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.V | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("is is a t", tf.Text);
|
|
|
|
- Assert.Equal ("is a", Clipboard.Contents);
|
|
|
|
|
|
+ Assert.Equal ("is is a t", tf.Text.ToString ());
|
|
|
|
+ Assert.Equal ("is a", Clipboard.Contents.ToString ());
|
|
Assert.Equal (7, tf.CursorPosition);
|
|
Assert.Equal (7, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.K | Key.AltMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.K | Key.AltMask, new KeyModifiers ())));
|
|
- Assert.Equal (" t", tf.Text);
|
|
|
|
- Assert.Equal ("is is a", Clipboard.Contents);
|
|
|
|
|
|
+ Assert.Equal (" t", tf.Text.ToString ());
|
|
|
|
+ Assert.Equal ("is is a", Clipboard.Contents.ToString ());
|
|
tf.Text = "TAB to jump between text fields.";
|
|
tf.Text = "TAB to jump between text fields.";
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
Assert.Equal (0, tf.CursorPosition);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("to jump between text fields.", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("to jump between text fields.", tf.Text.ToString ());
|
|
tf.CursorPosition = tf.Text.Length;
|
|
tf.CursorPosition = tf.Text.Length;
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace | Key.CtrlMask, new KeyModifiers ())));
|
|
- Assert.Equal ("to jump between text ", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("to jump between text ", tf.Text.ToString ());
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.T | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.T | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.Equal ("to jump between text ", tf.SelectedText);
|
|
Assert.Equal ("to jump between text ", tf.SelectedText);
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.D | Key.CtrlMask | Key.ShiftMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.D | Key.CtrlMask | Key.ShiftMask, new KeyModifiers ())));
|
|
- Assert.Equal ("", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("", tf.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -1134,7 +1134,7 @@ namespace Terminal.Gui.Views {
|
|
Application.Top.Add (tf);
|
|
Application.Top.Add (tf);
|
|
Application.Begin (Application.Top);
|
|
Application.Begin (Application.Top);
|
|
|
|
|
|
- Assert.Equal ("-1", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("-1", tf.Text.ToString ());
|
|
|
|
|
|
// InsertText
|
|
// InsertText
|
|
tf.SelectedStart = 1;
|
|
tf.SelectedStart = 1;
|
|
@@ -1144,7 +1144,7 @@ namespace Terminal.Gui.Views {
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.D2, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.D2, new KeyModifiers ())));
|
|
Assert.Equal ("-2", newText);
|
|
Assert.Equal ("-2", newText);
|
|
Assert.Equal ("-1", oldText);
|
|
Assert.Equal ("-1", oldText);
|
|
- Assert.Equal ("-2", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("-2", tf.Text.ToString ());
|
|
|
|
|
|
// DeleteCharLeft
|
|
// DeleteCharLeft
|
|
tf.SelectedStart = 1;
|
|
tf.SelectedStart = 1;
|
|
@@ -1154,7 +1154,7 @@ namespace Terminal.Gui.Views {
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.Backspace, new KeyModifiers ())));
|
|
Assert.Equal ("-", newText);
|
|
Assert.Equal ("-", newText);
|
|
Assert.Equal ("-2", oldText);
|
|
Assert.Equal ("-2", oldText);
|
|
- Assert.Equal ("-", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("-", tf.Text.ToString ());
|
|
|
|
|
|
// DeleteCharRight
|
|
// DeleteCharRight
|
|
tf.Text = "-1";
|
|
tf.Text = "-1";
|
|
@@ -1165,7 +1165,7 @@ namespace Terminal.Gui.Views {
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.DeleteChar, new KeyModifiers ())));
|
|
Assert.Equal ("-", newText);
|
|
Assert.Equal ("-", newText);
|
|
Assert.Equal ("-1", oldText);
|
|
Assert.Equal ("-1", oldText);
|
|
- Assert.Equal ("-", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("-", tf.Text.ToString ());
|
|
|
|
|
|
// Cut
|
|
// Cut
|
|
tf.Text = "-1";
|
|
tf.Text = "-1";
|
|
@@ -1176,7 +1176,7 @@ namespace Terminal.Gui.Views {
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.X | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.True (tf.ProcessKey (new KeyEvent (Key.X | Key.CtrlMask, new KeyModifiers ())));
|
|
Assert.Equal ("-", newText);
|
|
Assert.Equal ("-", newText);
|
|
Assert.Equal ("-1", oldText);
|
|
Assert.Equal ("-1", oldText);
|
|
- Assert.Equal ("-", tf.Text);
|
|
|
|
|
|
+ Assert.Equal ("-", tf.Text.ToString ());
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|