forked from vim-test/vim-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkotlin_gradletest_spec.vim
208 lines (153 loc) · 5.44 KB
/
kotlin_gradletest_spec.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
source spec/support/helpers.vim
describe "Gradle plain module"
before
cd spec/fixtures/gradle/kotlin/gradle_plain
end
after
call Teardown()
cd -
end
it "runs file tests (filename matches Test*.kt)"
view TestMath.kt
TestFile
Expect g:test#last_command == './gradlew test --tests TestMath'
end
it "runs file tests (filename matches *Test.kt)"
view CalculationTest.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTest'
end
it "runs file tests (filename matches *Tests.kt)"
view CalculationTests.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTests'
end
it "runs file tests (filename matches *TestCase.kt)"
view CalculationTestCase.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTestCase'
end
it "runs file tests with user provided options"
view CalculationTest.kt
TestFile -b build.gradle
Expect g:test#last_command == './gradlew test -b build.gradle --tests CalculationTest'
end
it "runs nearest tests"
view +37 CalculationTest.kt
TestNearest
Expect g:test#last_command == "./gradlew test --tests CalculationTest.testFailedSub"
end
it "runs nearest tests which has a backtick surrounded name"
view +27 CalculationTest.kt
TestNearest
Expect g:test#last_command == "./gradlew test --tests CalculationTest.\"tests calculating a sum of 3 + 5\""
end
it "runs a suite"
view CalculationTest.kt
TestSuite
Expect g:test#last_command == './gradlew test'
end
it "runs a test suite with user provided options"
view CalculationTest.kt
TestSuite --info -b build.gradle -DcustomProperty=5
Expect g:test#last_command == './gradlew test --info -b build.gradle -DcustomProperty=5'
end
end
describe "Gradle single module"
before
cd spec/fixtures/gradle/kotlin/gradle_single_module
end
after
call Teardown()
cd -
end
it "runs file tests (filename matches Test*.kt)"
view src/test/kotlin/TestCalculation.kt
TestFile
Expect g:test#last_command == './gradlew test --tests TestCalculation'
end
it "runs file tests (filename matches *Test.kt)"
view src/test/kotlin/CalculationTest.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTest'
end
it "runs file tests (filename matches *Tests.kt)"
view src/test/kotlin/CalculationTests.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTests'
end
it "runs file tests (filename matches *TestCase.kt)"
view src/test/kotlin/CalculationTestCase.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTestCase'
end
it "runs file tests with user provided options"
view src/test/kotlin/CalculationTest.kt
TestFile -b build.gradle
Expect g:test#last_command == './gradlew test -b build.gradle --tests CalculationTest'
end
it "runs nearest tests"
view +37 src/test/kotlin/CalculationTest.kt
TestNearest
Expect g:test#last_command == "./gradlew test --tests CalculationTest.testFailedSub"
end
it "runs a suite"
view src/test/kotlin/CalculationTest.kt
TestSuite
Expect g:test#last_command == './gradlew test'
end
it "runs a test suite with user provided options"
view src/test/kotlin/CalculationTest.kt
TestSuite --info -b build.gradle -DcustomProperty=5
Expect g:test#last_command == './gradlew test --info -b build.gradle -DcustomProperty=5'
end
end
describe "Gradle muilti module"
before
cd spec/fixtures/gradle/kotlin/gradle_multi_module
end
after
call Teardown()
cd -
end
it "runs file tests (filename matches Test*.kt)"
view sample_module/src/test/kotlin/TestCalculation.kt
TestFile
Expect g:test#last_command == './gradlew test --tests TestCalculation -p sample_module'
end
it "runs file tests (filename matches *Test.kt)"
view sample_module/src/test/kotlin/CalculationTest.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTest -p sample_module'
end
it "runs file tests (filename matches *Tests.kt)"
view sample_module/src/test/kotlin/CalculationTests.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTests -p sample_module'
end
it "runs file tests (filename matches *TestCase.kt)"
view sample_module/src/test/kotlin/CalculationTestCase.kt
TestFile
Expect g:test#last_command == './gradlew test --tests CalculationTestCase -p sample_module'
end
it "runs file tests with user provided options"
view sample_module/src/test/kotlin/CalculationTest.kt
TestFile -b build.gradle
Expect g:test#last_command == './gradlew test -b build.gradle --tests CalculationTest -p sample_module'
end
it "runs nearest tests"
view +37 sample_module/src/test/kotlin/CalculationTest.kt
TestNearest
Expect g:test#last_command == "./gradlew test --tests CalculationTest.testFailedSub -p sample_module"
end
it "runs a suite"
view sample_module/src/test/kotlin/CalculationTest.kt
TestSuite
Expect g:test#last_command == './gradlew test -p sample_module'
end
it "runs a test suite with user provided options"
view sample_module/src/test/kotlin/CalculationTest.kt
TestSuite --info -b build.gradle -DcustomProperty=5
Expect g:test#last_command == './gradlew test --info -b build.gradle -DcustomProperty=5 -p sample_module'
end
end