File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ mod.run = function(file)
225
225
print (color_string (" red" , msg ))
226
226
print (HEADER )
227
227
if is_headless then
228
- os.exit ( 2 )
228
+ return vim . cmd " 2cq "
229
229
else
230
230
return
231
231
end
@@ -234,7 +234,7 @@ mod.run = function(file)
234
234
-- If nothing runs (empty file without top level describe)
235
235
if not results .pass then
236
236
if is_headless then
237
- os.exit ( 0 )
237
+ return vim . cmd " 0cq "
238
238
else
239
239
return
240
240
end
@@ -245,17 +245,17 @@ mod.run = function(file)
245
245
if # results .fatal ~= 0 then
246
246
print (" We had an unexpected error: " , vim .inspect (results .fatal ), vim .inspect (results ))
247
247
if is_headless then
248
- os.exit ( 2 )
248
+ return vim . cmd " 2cq "
249
249
end
250
250
elseif # results .fail > 0 then
251
251
print " Tests Failed. Exit: 1"
252
252
253
253
if is_headless then
254
- os.exit ( 1 )
254
+ return vim . cmd " 1cq "
255
255
end
256
256
else
257
257
if is_headless then
258
- os.exit ( 0 )
258
+ return vim . cmd " 0cq "
259
259
end
260
260
end
261
261
end
Original file line number Diff line number Diff line change @@ -158,10 +158,10 @@ function harness.test_directory(directory, opts)
158
158
159
159
if headless then
160
160
if failure then
161
- os.exit ( 1 )
161
+ return vim . cmd " 1cq "
162
162
end
163
163
164
- os.exit ( 0 )
164
+ return vim . cmd " 0cq "
165
165
end
166
166
end
167
167
You can’t perform that action at this time.
0 commit comments