diff --git a/test/mode/modeNormal.test.ts b/test/mode/modeNormal.test.ts index 57d704cf3e2..b056c33e3bf 100644 --- a/test/mode/modeNormal.test.ts +++ b/test/mode/modeNormal.test.ts @@ -1267,4 +1267,12 @@ suite("Mode Normal", () => { end: ["{", " |"], endMode: ModeName.Insert }); + + newTest({ + title: "Indent current line with correct Vim Mode", + start: ["|one", "two"], + keysPressed: ">>", + end: ["\t|one", "two"], + endMode: ModeName.Normal + }); }); \ No newline at end of file diff --git a/test/mode/normalModeTests/dot.test.ts b/test/mode/normalModeTests/dot.test.ts index a0969b1005b..9932ef13760 100644 --- a/test/mode/normalModeTests/dot.test.ts +++ b/test/mode/normalModeTests/dot.test.ts @@ -64,7 +64,7 @@ suite("Dot Operator", () => { title: "Can repeat actions that require selections", start: ['on|e', 'two'], keysPressed: 'Vj>.', - end: [' |one', ' two'] + end: ['\t\t|one', '\t\ttwo'] }); }); diff --git a/test/operator/put.test.ts b/test/operator/put.test.ts index 941d0c6541d..c28930ff8e4 100644 --- a/test/operator/put.test.ts +++ b/test/operator/put.test.ts @@ -2,18 +2,23 @@ import { ModeHandler } from "../../src/mode/modeHandler"; import { setupWorkspace, cleanUpWorkspace, assertEqualLines } from '../testUtils'; +import { getTestingFunctions } from '../testSimplifier'; suite("put operator", () => { - let modeHandler: ModeHandler; + let modeHandler: ModeHandler = new ModeHandler(); + + let { + newTest, + newTestOnly, + } = getTestingFunctions(modeHandler); setup(async () => { await setupWorkspace(); - modeHandler = new ModeHandler(); }); - suiteTeardown(cleanUpWorkspace); + teardown(cleanUpWorkspace); test("basic put test", async () => { await modeHandler.handleMultipleKeyEvents( @@ -67,4 +72,10 @@ suite("put operator", () => { await assertEqualLines(["1", "2", "2", "3"]); }); + newTest({ + title: "test yy with correct positon movement", + start: ["o|ne", "two", "three", "four"], + keysPressed: '2yyjjpk', + end: ["one", "two", "|three", "one", "two", "four"] + }); }); \ No newline at end of file diff --git a/test/testUtils.ts b/test/testUtils.ts index a8d199df65e..8161ce62d23 100644 --- a/test/testUtils.ts +++ b/test/testUtils.ts @@ -84,4 +84,8 @@ export async function cleanUpWorkspace(): Promise<any> { export function setTextEditorOptions(tabSize: number, insertSpaces: boolean): void { Configuration.getInstance().tabstop = tabSize; Configuration.getInstance().expandtab = insertSpaces; + let options = vscode.window.activeTextEditor.options; + options.tabSize = tabSize; + options.insertSpaces = insertSpaces; + vscode.window.activeTextEditor.options = options; } \ No newline at end of file