Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test enhancement #938

Merged
merged 3 commits into from
Oct 18, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
make sure we update cursor position internally correctly
  • Loading branch information
rebornix committed Oct 18, 2016
commit d4ae255522245e266c2e7621ac68445513b6616d
17 changes: 14 additions & 3 deletions test/operator/put.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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"]
});
});