Skip to content

Commit 0106cab

Browse files
author
hardenedapple
committed
Add test for tracking extensions
1 parent 03d6ae4 commit 0106cab

12 files changed

+119
-0
lines changed

tests/trackextension.vim

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
" TODO: ensure that the configuration is already set
3+
4+
" We set recursive to 0 despite this not having any effect on some
5+
" grep programs.
6+
" This is to isolate a problem seen in other grep programs.
7+
let g:EasyGrepMode=2
8+
let g:EasyGrepRecursive=0
9+
10+
edit alphabet.in
11+
12+
ResultListTag GrepAdd a
13+
GrepAdd a
14+
15+
cclose
16+
exe "ResultListSave ".testname.".out"
17+
quit!
18+
19+

tests/trackextension_ack.ok

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
alphabet.in|1 col 1| GrepAdd a
2+
\home\matthew\.vim\bundle\easygrep\tests\recursion\a\alphabet.in|1 col 0| 1:a
3+
\home\matthew\.vim\bundle\easygrep\tests\recursion\c\alphabet.in|1 col 0| 1:a
4+
\home\matthew\.vim\bundle\easygrep\tests\recursion\b\alphabet.in|1 col 0| 1:a
5+
alphabet.in|1 col 0| 1:a
6+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|2 col 0| 4:myvar = this
7+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|3 col 0| 4:myvar =that
8+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|4 col 0| 4:myvar=that
9+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|6 col 0| 3://a.b[i][j][k] += float(blk->dt * q(i,j,k)->v[1]);
10+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|8 col 0| 10:"This is a \\string with lots\ of backslash"
11+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|9 col 0| 28:Don't forget to go to the mall!
12+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|10 col 0| 3:Email me at [email protected]
13+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|11 col 0| 3:What is your phone #?
14+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|12 col 0| 3:What % of the sale is your commission?
15+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|13 col 0| 16:We don't use ~ a lot in English but in spanish it's used a lot.
16+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|14 col 0| 13:Use the ^ (caret) to switch between files.
17+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|15 col 0| 8:I like apples & bananas
18+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|17 col 0| 11:How important is this to you (it's important to me).
19+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|18 col 0| 3:What is this - that?
20+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|19 col 0| 1:a + b = c, elementary
21+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|20 col 0| 13:Group important words in {}
22+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|22 col 0| 2:Can you find \<this\>
23+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|23 col 0| 14:int x = Froobarnium();
24+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|24 col 0| 7:This has\ some \ escapes in it.
25+
\home\matthew\.vim\bundle\easygrep\tests\__simpleregex.in|1 col 0| 1:a
26+
\home\matthew\.vim\bundle\easygrep\tests\__simpleregex.in|53 col 0| 2:[a-c]

tests/trackextension_ack.vim

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

tests/trackextension_ag.ok

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
alphabet.in|1 col 1| GrepAdd a
2+
\home\matthew\.vim\bundle\easygrep\tests\recursion\a\alphabet.in|1 col 0| 1:a
3+
\home\matthew\.vim\bundle\easygrep\tests\recursion\c\alphabet.in|1 col 0| 1:a
4+
\home\matthew\.vim\bundle\easygrep\tests\recursion\b\alphabet.in|1 col 0| 1:a
5+
alphabet.in|1 col 0| 1:a
6+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|2 col 0| 4:myvar = this
7+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|3 col 0| 4:myvar =that
8+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|4 col 0| 4:myvar=that
9+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|6 col 0| 3://a.b[i][j][k] += float(blk->dt * q(i,j,k)->v[1]);
10+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|8 col 0| 10:"This is a \\string with lots\ of backslash"
11+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|9 col 0| 28:Don't forget to go to the mall!
12+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|10 col 0| 3:Email me at [email protected]
13+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|11 col 0| 3:What is your phone #?
14+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|12 col 0| 3:What % of the sale is your commission?
15+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|13 col 0| 16:We don't use ~ a lot in English but in spanish it's used a lot.
16+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|14 col 0| 13:Use the ^ (caret) to switch between files.
17+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|15 col 0| 8:I like apples & bananas
18+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|17 col 0| 11:How important is this to you (it's important to me).
19+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|18 col 0| 3:What is this - that?
20+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|19 col 0| 1:a + b = c, elementary
21+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|20 col 0| 13:Group important words in {}
22+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|22 col 0| 2:Can you find \<this\>
23+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|23 col 0| 14:int x = Froobarnium();
24+
\home\matthew\.vim\bundle\easygrep\tests\specialchar\specialchar.in|24 col 0| 7:This has\ some \ escapes in it.
25+
\home\matthew\.vim\bundle\easygrep\tests\__simpleregex.in|1 col 0| 1:a
26+
\home\matthew\.vim\bundle\easygrep\tests\__simpleregex.in|53 col 0| 2:[a-c]

tests/trackextension_ag.vim

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

tests/trackextension_grep.ok

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
alphabet.in|1 col 1| GrepAdd a
2+
alphabet.in|1 col 0| a
3+
\home\matthew\.vim\bundle\easygrep\tests\__simpleregex.in|1 col 0| a
4+
\home\matthew\.vim\bundle\easygrep\tests\__simpleregex.in|53 col 0| [a-c]

tests/trackextension_grep.vim

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

tests/trackextension_pt.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Unknown

tests/trackextension_pt.vim

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

tests/trackextension_vimgrep.ok

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
alphabet.in|1 col 1| GrepAdd a
2+
__simpleregex.in|1 col 1| a
3+
__simpleregex.in|53 col 2| [a-c]
4+
alphabet.in|1 col 1| a

tests/trackextension_vimgrep.vim

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

tests/vimgrep.suite

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ simpleregex_grep.vim
5252
simpleregex_pt.vim
5353
simpleregex_vimgrep.vim
5454

55+
# trackextension
56+
trackextension_ack.vim
57+
trackextension_ag.vim
58+
trackextension_grep.vim
59+
trackextension_pt.vim
60+
trackextension_vimgrep.vim
61+
62+
63+
5564
#-------------------------------------------------------------------------------
5665
# ResultList tests
5766
#-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)