Skip to content

Commit

Permalink
Merge pull request #260 from darrenweston/someTests
Browse files Browse the repository at this point in the history
Added some 'r' tests
  • Loading branch information
johnfn committed Jun 9, 2016
2 parents b9681b5 + 48c806f commit 0626e9d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/mode/modeNormal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,5 +489,26 @@ suite("Mode Normal", () => {
});


test("Can handle 'r'", async () => {
await modeHandler.handleMultipleKeyEvents([
'i',
't', 'e', 'x', 't',
'<esc>',
'h',
'r', 's',
]);

assertEqualLines(["test"]);
});

test("Can handle 'r' after 'dd'", async () => {
await modeHandler.handleMultipleKeyEvents("ione\ntwo\nthree".split(""));
await modeHandler.handleMultipleKeyEvents([
'<esc>', 'k', 'd', 'd',
'r', 'T'
]);

assertEqualLines(["one", "Three"]);
});

});

0 comments on commit 0626e9d

Please sign in to comment.