Skip to content

Commit a6d5d58

Browse files
committed
Add wholeword test
1 parent 2fe3506 commit a6d5d58

17 files changed

+137
-7
lines changed

tests/__wholeword.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
whole
2+
word
3+
wholeword
4+
wordwholeword

tests/casesensitivity.ok

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/casesensitivity.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ GrepAdd C
1414
let g:EasyGrepIgnoreCase=1
1515
GrepAdd c
1616
GrepAdd C
17-
cclose
1817

18+
cclose
1919
exe "ResultListSave ".testname.".out"
2020
quit!
2121

tests/vimgrep.suite

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ casesensitivity_grep.vim
77
casesensitivity_pt.vim
88
casesensitivity_vimgrep.vim
99

10+
# wholeword
11+
wholeword_ack.vim
12+
wholeword_ag.vim
13+
wholeword_findstr.vim
14+
wholeword_grep.vim
15+
wholeword_pt.vim
16+
wholeword_vimgrep.vim
17+

tests/wholeword.vim

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
3+
let g:EasyGrepDefaultUserPattern="__wholeword.in"
4+
let g:EasyGrepMode=3
5+
6+
" Load the test data.
7+
edit __wholeword.in
8+
9+
Grep whole
10+
GrepAdd word
11+
GrepAdd wholeword
12+
13+
" Invert whole word
14+
GrepAdd! whole
15+
GrepAdd! word
16+
GrepAdd! wholeword
17+
18+
cclose
19+
exe "ResultListSave ".testname.".out"
20+
quit!
21+
22+

tests/wholeword_ack.ok

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
__wholeword.in|1 col 0| 1:whole
2+
__wholeword.in|3 col 0| 1:wholeword
3+
__wholeword.in|4 col 0| 5:wordwholeword
4+
__wholeword.in|2 col 0| 1:word
5+
__wholeword.in|3 col 0| 6:wholeword
6+
__wholeword.in|4 col 0| 1:wordwholeword
7+
__wholeword.in|3 col 0| 1:wholeword
8+
__wholeword.in|4 col 0| 5:wordwholeword
9+
__wholeword.in|1 col 0| 1:whole
10+
__wholeword.in|2 col 0| 1:word
11+
__wholeword.in|3 col 0| 1:wholeword

tests/wholeword_ack.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
let testname="wholeword_ack"
3+
GrepProgram ack
4+
5+
source wholeword.vim
6+

tests/wholeword_ag.ok

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
1|1 col 0| whole
2+
3|1 col 0| wholeword
3+
4|5 col 0| wordwholeword
4+
2|1 col 0| word
5+
3|6 col 0| wholeword
6+
4|1 col 0| wordwholeword
7+
3|1 col 0| wholeword
8+
4|5 col 0| wordwholeword
9+
1|1 col 0| whole
10+
2|1 col 0| word
11+
3|1 col 0| wholeword

tests/wholeword_ag.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
let testname="wholeword_ag"
3+
GrepProgram ag
4+
5+
source wholeword.vim
6+

tests/wholeword_findstr.ok

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
__wholeword.in|0 col 0| 1:whole
2+
__wholeword.in|0 col 0| 3:wholeword
3+
__wholeword.in|0 col 0| 4:wordwholeword
4+
__wholeword.in|0 col 0| 2:word
5+
__wholeword.in|0 col 0| 3:wholeword
6+
__wholeword.in|0 col 0| 4:wordwholeword
7+
__wholeword.in|0 col 0| 3:wholeword
8+
__wholeword.in|0 col 0| 4:wordwholeword
9+
__wholeword.in|0 col 0| 1:whole
10+
__wholeword.in|0 col 0| 2:word
11+
__wholeword.in|0 col 0| 3:wholeword

tests/wholeword_findstr.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
let testname="wholeword_findstr"
3+
GrepProgram findstr
4+
5+
source wholeword.vim
6+

tests/wholeword_grep.ok

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
__wholeword.in|0 col 0| 1:whole
2+
__wholeword.in|0 col 0| 3:wholeword
3+
__wholeword.in|0 col 0| 4:wordwholeword
4+
__wholeword.in|0 col 0| 2:word
5+
__wholeword.in|0 col 0| 3:wholeword
6+
__wholeword.in|0 col 0| 4:wordwholeword
7+
__wholeword.in|0 col 0| 3:wholeword
8+
__wholeword.in|0 col 0| 4:wordwholeword
9+
__wholeword.in|0 col 0| 1:whole
10+
__wholeword.in|0 col 0| 2:word
11+
__wholeword.in|0 col 0| 3:wholeword

tests/wholeword_grep.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
let testname="wholeword_grep"
3+
GrepProgram grep
4+
5+
source wholeword.vim
6+

tests/wholeword_pt.ok

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
__wholeword.in|1 col 0| whole
2+
__wholeword.in|3 col 0| wholeword
3+
__wholeword.in|4 col 0| wordwholeword
4+
__wholeword.in|2 col 0| word
5+
__wholeword.in|3 col 0| wholeword
6+
__wholeword.in|4 col 0| wordwholeword
7+
__wholeword.in|3 col 0| wholeword
8+
__wholeword.in|4 col 0| wordwholeword
9+
__wholeword.in|1 col 0| whole
10+
__wholeword.in|2 col 0| word
11+
__wholeword.in|3 col 0| wholeword

tests/wholeword_pt.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
let testname="wholeword_pt"
3+
GrepProgram pt
4+
5+
source wholeword.vim
6+

tests/wholeword_vimgrep.ok

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
__wholeword.in|1 col 1| whole
2+
__wholeword.in|3 col 1| wholeword
3+
__wholeword.in|4 col 5| wordwholeword
4+
__wholeword.in|2 col 1| word
5+
__wholeword.in|3 col 6| wholeword
6+
__wholeword.in|4 col 1| wordwholeword
7+
__wholeword.in|3 col 1| wholeword
8+
__wholeword.in|4 col 5| wordwholeword
9+
__wholeword.in|1 col 1| whole
10+
__wholeword.in|2 col 1| word
11+
__wholeword.in|3 col 1| wholeword

tests/wholeword_vimgrep.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
let testname="wholeword_vimgrep"
3+
GrepProgram vimgrep
4+
5+
source wholeword.vim
6+

0 commit comments

Comments
 (0)