Skip to content

Commit e0dfea6

Browse files
committed
Add recursionuserpattern tests
These tests exercise a user pattern when in recursive mode
1 parent e68bb19 commit e0dfea6

14 files changed

+232
-0
lines changed

tests/recursionuserpattern.vim

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
3+
" TODO: ensure that the configuration is already set
4+
5+
let g:EasyGrepMode=3
6+
let g:EasyGrepRecursive=1
7+
GrepRoot recursionuserpattern
8+
9+
ResultListTag GrepAdd -I c
10+
GrepAdd -I c
11+
ResultListTag GrepAdd -I C
12+
GrepAdd -I C
13+
14+
cclose
15+
exe "ResultListSave ".testname.".out"
16+
quit!
17+
18+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
a
2+
b
3+
c
4+
d
5+
e
6+
f
7+
g
8+
h
9+
i
10+
j
11+
k
12+
l
13+
m
14+
n
15+
o
16+
p
17+
q
18+
r
19+
s
20+
t
21+
u
22+
v
23+
w
24+
x
25+
y
26+
z
27+
A
28+
B
29+
C
30+
D
31+
E
32+
F
33+
G
34+
H
35+
I
36+
J
37+
K
38+
L
39+
M
40+
N
41+
O
42+
P
43+
Q
44+
R
45+
S
46+
T
47+
U
48+
V
49+
W
50+
X
51+
Y
52+
Z
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
a
2+
b
3+
c
4+
d
5+
e
6+
f
7+
g
8+
h
9+
i
10+
j
11+
k
12+
l
13+
m
14+
n
15+
o
16+
p
17+
q
18+
r
19+
s
20+
t
21+
u
22+
v
23+
w
24+
x
25+
y
26+
z
27+
A
28+
B
29+
C
30+
D
31+
E
32+
F
33+
G
34+
H
35+
I
36+
J
37+
K
38+
L
39+
M
40+
N
41+
O
42+
P
43+
Q
44+
R
45+
S
46+
T
47+
U
48+
V
49+
W
50+
X
51+
Y
52+
Z
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
a
2+
b
3+
c
4+
d
5+
e
6+
f
7+
g
8+
h
9+
i
10+
j
11+
k
12+
l
13+
m
14+
n
15+
o
16+
p
17+
q
18+
r
19+
s
20+
t
21+
u
22+
v
23+
w
24+
x
25+
y
26+
z
27+
A
28+
B
29+
C
30+
D
31+
E
32+
F
33+
G
34+
H
35+
I
36+
J
37+
K
38+
L
39+
M
40+
N
41+
O
42+
P
43+
Q
44+
R
45+
S
46+
T
47+
U
48+
V
49+
W
50+
X
51+
Y
52+
Z

tests/recursionuserpattern_ack.ok

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
|1 col 1| GrepAdd -I c
2+
recursionuserpattern\c\alphabet.c|3 col 0| 1:c
3+
|1 col 1| GrepAdd -I C
4+
recursionuserpattern\c\alphabet.c|29 col 0| 1:C

tests/recursionuserpattern_ack.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
let testname="recursionuserpattern_ack"
3+
GrepProgram ack
4+
5+
let g:EasyGrepDefaultUserPattern="cc"
6+
source recursionuserpattern.vim
7+

tests/recursionuserpattern_ag.ok

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
|1 col 1| GrepAdd -I c
2+
recursionuserpattern\c\alphabet.c|3 col 0| 1:c
3+
|1 col 1| GrepAdd -I C
4+
recursionuserpattern\c\alphabet.c|29 col 0| 1:C

tests/recursionuserpattern_ag.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
let testname="recursionuserpattern_ag"
3+
GrepProgram ag
4+
5+
let g:EasyGrepDefaultUserPattern="\\.c"
6+
source recursionuserpattern.vim
7+

tests/recursionuserpattern_grep.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
let testname="recursionuserpattern_grep"
3+
GrepProgram grep
4+
5+
let g:EasyGrepDefaultUserPattern="*.c"
6+
source recursionuserpattern.vim
7+

tests/recursionuserpattern_pt.ok

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
|1 col 1| GrepAdd -I c
2+
recursionuserpattern\c\alphabet.c|3 col 0| c
3+
|1 col 1| GrepAdd -I C
4+
recursionuserpattern\c\alphabet.c|29 col 0| C

tests/recursionuserpattern_pt.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
let testname="recursionuserpattern_pt"
3+
GrepProgram pt
4+
5+
let g:EasyGrepDefaultUserPattern="\\.c"
6+
source recursionuserpattern.vim
7+

tests/recursionuserpattern_vimgrep.ok

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
|1 col 1| GrepAdd -I c
2+
.\recursionuserpattern\c\alphabet.c|3 col 1| c
3+
|1 col 1| GrepAdd -I C
4+
.\recursionuserpattern\c\alphabet.c|29 col 1| C
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
let testname="recursionuserpattern_vimgrep"
3+
GrepProgram vimgrep
4+
5+
let g:EasyGrepDefaultUserPattern="*.c"
6+
source recursionuserpattern.vim
7+

tests/vimgrep.suite

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ recursion_grep.vim
2727
# recursion_pt.vim # disabled; output is non-deterministic
2828
recursion_vimgrep.vim
2929

30+
# recursionuserpattern
31+
recursionuserpattern_ack.vim
32+
recursionuserpattern_ag.vim
33+
recursionuserpattern_grep.vim
34+
recursionuserpattern_pt.vim
35+
recursionuserpattern_vimgrep.vim
36+
3037
# simpleregex
3138
simpleregex_ack.vim
3239
simpleregex_ag.vim

0 commit comments

Comments
 (0)