public void PutOver_Block_WithBlockAndCaretMove() { Create("dog", "cat"); EnterBlock(_textView.GetBlockSpan(1, 1, 0, 2)); UnnamedRegister.UpdateBlockValues("aa", "bb"); _buffer.Process("gp"); Assert.AreEqual("daag", _textView.GetLine(0).GetText()); Assert.AreEqual("cbbt", _textView.GetLine(1).GetText()); Assert.AreEqual(_textView.GetLine(1).Start.Add(3), _textView.GetCaretPoint()); }
public void PutOver_CharacterWise_WithBlockAndCaretMove() { Create("dog", "cat"); EnterMode(ModeKind.VisualCharacter, _textView.GetLineSpan(0, 1, 1)); UnnamedRegister.UpdateBlockValues("aa", "bb"); _buffer.Process("gp"); Assert.AreEqual("daag", _textView.GetLine(0).GetText()); Assert.AreEqual("cbbat", _textView.GetLine(1).GetText()); Assert.AreEqual(_textView.GetLine(1).Start.Add(3), _textView.GetCaretPoint()); }
public void PutOver_LineWise_WithBlockAndCaretMove() { Create("dog", "cat"); EnterMode(ModeKind.VisualLine, _textView.GetLineRange(0).ExtentIncludingLineBreak); UnnamedRegister.UpdateBlockValues("aa", "bb"); _buffer.Process("gp"); Assert.AreEqual("aa", _textView.GetLine(0).GetText()); Assert.AreEqual("bb", _textView.GetLine(1).GetText()); Assert.AreEqual("cat", _textView.GetLine(2).GetText()); Assert.AreEqual(_textView.GetLine(2).Start, _textView.GetCaretPoint()); Assert.AreEqual("dog\r\n", UnnamedRegister.StringValue); }