Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
#68 add diw daw tests
Browse files Browse the repository at this point in the history
  • Loading branch information
74th committed Dec 25, 2017
1 parent 1db62fd commit 7e7f026
Showing 1 changed file with 111 additions and 3 deletions.
114 changes: 111 additions & 3 deletions test/vim/TextObjects.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,112 @@
export let TextObjects = {};
export let TextObjects: { [key: string]: { [key: string]: any } } = {};

TextObjects["delete inner word"] = {
"diw": {
in: ["aaa b|bb ccc ddd"],
key: "diw",
out: ["aaa | ccc ddd"],
},
"d2iw": {
in: ["aaa b|bb ccc ddd"],
key: "d2iw",
out: ["aaa |ccc ddd"],
},
"d3iw": {
in: ["aaa b|bb ccc ddd"],
key: "d3iw",
out: ["aaa | ddd"],
},
"d2iw for lf": {
in: [
"aaa b|bb",
"ccc ddd",
],
key: "d2iw",
out: ["aaa | ddd"],
},
"d2iw for if and space": {
in: [
"aaa b|bb ",
"ccc ddd",
],
key: "d2iw",
out: [
"aaa| ",
"ccc ddd",
],
},
"d3iw for lf": {
in: [
"aaa b|bb",
"ccc ddd",
],
key: "d3iw",
out: ["aaa |ddd"],
},
"d3iw for lf and space": {
in: [
"aaa b|bb ",
"ccc ddd",
],
key: "d3iw",
out: [
"aaa | ddd",
],
},
};
TextObjects["delete outer word"] = {
"daw": {
in: ["aaa b|bb ccc ddd"],
key: "daw",
out: ["aaa |ccc ddd"],
},
"d2aw": {
in: ["aaa b|bb ccc ddd"],
key: "d2aw",
out: ["aaa |ddd"],
},
"d3aw": {
in: ["aaa b|bb ccc ddd"],
key: "d3aw",
out: ["aa|a"],
},
"d2aw for lf": {
in: [
"aaa b|bb",
"ccc ddd",
],
key: "d2aw",
out: ["aaa |ddd"],
},
"d2aw for if and space": {
in: [
"aaa b|bb ",
"ccc ddd",
],
key: "d2aw",
out: [
"aaa |ddd",
],
},
"d3aw for lf": {
in: [
"aaa b|bb",
"ccc ddd eee",
],
key: "d3aw",
out: ["aaa |eee"],
},
"d3aw for lf and space": {
in: [
"aaa b|bb ",
"ccc ddd eee",
],
key: "d3aw",
out: [
"aaa |eee",
],
},
};

TextObjects["di("] = {
"di(": {
Expand Down Expand Up @@ -112,7 +220,7 @@ TextObjects["di'"] = {
key: "di`",
out: ["` `|` `"],
},
}
};

TextObjects["da'"] = {
"da'": {
Expand All @@ -130,4 +238,4 @@ TextObjects["da'"] = {
key: "da`",
out: ["` |`"],
},
}
};

0 comments on commit 7e7f026

Please sign in to comment.