Skip to content

Commit

Permalink
Test for regex
Browse files Browse the repository at this point in the history
  • Loading branch information
uga-rosa committed Dec 3, 2023
1 parent 069b5f1 commit 847c328
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions denops/denippet/main_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ test({
maps: ["foo"],
expectBuffer: ["console.log(foo|, foo)"],
},
{
name: "regex (update on InsertLeave)",
body: "$1 ${1/(.)(.)(.)/$3$2$1/}",
maps: ["abc", "\\<Esc>"],
expectBuffer: ["abc| cba"],
},
{
name: "regex (update on jump)",
body: "$1 ${1/(.)(.)(.)/$3$2$1/} $2",
maps: ["abc", map.jumpNext, "foo"],
expectBuffer: ["abc cba foo|"],
},
];

for (const spec of specs) {
Expand Down

0 comments on commit 847c328

Please sign in to comment.