public void SetRegisterValue_DeleteSingleLine() { var reg = _map.GetRegister('c'); _map.SetRegisterValue(reg, RegisterOperation.Delete, RegisterValue.OfString("foo bar", OperationKind.CharacterWise)); AssertRegister(reg, "foo bar", OperationKind.CharacterWise); AssertRegister(RegisterName.Unnamed, "foo bar", OperationKind.CharacterWise); AssertRegister(RegisterName.NewNumbered(NumberedRegister.Register_1), "foo bar", OperationKind.CharacterWise); AssertRegister(RegisterName.SmallDelete, "foo bar", OperationKind.CharacterWise); }
public void ForSpan_DeleteToBlackHole() { _map.GetRegister(RegisterName.Blackhole).UpdateValue("", OperationKind.CharacterWise); _map.GetRegister(RegisterName.NewNumbered(NumberedRegister.Number1)).UpdateValue("hey", OperationKind.CharacterWise); var namedReg = _map.GetRegister('c'); _map.SetRegisterValue(namedReg, RegisterOperation.Yank, new RegisterValue("foo bar", OperationKind.CharacterWise)); _map.SetRegisterValue(_map.GetRegister(RegisterName.Blackhole), RegisterOperation.Delete, new RegisterValue("foo bar", OperationKind.CharacterWise)); AssertRegister(namedReg, "foo bar", OperationKind.CharacterWise); AssertRegister(RegisterName.Unnamed, "foo bar", OperationKind.CharacterWise); AssertRegister(RegisterName.NewNumbered(NumberedRegister.Number1), "hey", OperationKind.CharacterWise); AssertRegister(RegisterName.Blackhole, "", OperationKind.CharacterWise); }