@@ -5,7 +5,7 @@ describe('Tests command-line interface', function()
5
5
local defaultOutput = ' default_output_handler'
6
6
local lpath = ' ./src/?.lua;./src/?/?.lua;./src/?/init.lua'
7
7
local cpath = path .is_windows and ' ./csrc/?.dll;./csrc/?/?.dll;' or ' ./csrc/?.so;./csrc/?/?.so;'
8
- local cli = require ' busted.modules.cli' ({ batch = true , defaultOutput = defaultOutput })
8
+ local cli = require ' busted.modules.cli' ({ standalone = false , defaultOutput = defaultOutput })
9
9
local args = cli :parse ({})
10
10
assert .is_equal (defaultOutput , args .o )
11
11
assert .is_equal (defaultOutput , args .output )
@@ -59,7 +59,7 @@ describe('Tests command-line interface', function()
59
59
end )
60
60
61
61
it (' standalone options disables ROOT and --pattern' , function ()
62
- local cli = require ' busted.modules.cli' ()
62
+ local cli = require ' busted.modules.cli' ({ standalone = true } )
63
63
local args = cli :parse ({})
64
64
assert .is_nil (args .ROOT )
65
65
assert .is_nil (args .p )
@@ -197,15 +197,15 @@ describe('Tests command-line interface', function()
197
197
end )
198
198
199
199
it (' specify ROOT arg and --pattern' , function ()
200
- local cli = require ' busted.modules.cli' ({ batch = true })
200
+ local cli = require ' busted.modules.cli' ({ standalone = false })
201
201
local args = cli :parse ({ ' -p' , ' match_files' , ' root_is_here' })
202
202
assert .is_same ({' root_is_here' }, args .ROOT )
203
203
assert .is_equal (' match_files' , args .p )
204
204
assert .is_equal (' match_files' , args .pattern )
205
205
end )
206
206
207
207
it (' specify multiple root paths' , function ()
208
- local cli = require ' busted.modules.cli' ({ batch = true })
208
+ local cli = require ' busted.modules.cli' ({ standalone = false })
209
209
local args = cli :parse ({' root1_path' , ' root2_path' , ' root3_path' })
210
210
assert .is_same ({' root1_path' , ' root2_path' , ' root3_path' }, args .ROOT )
211
211
end )
@@ -313,7 +313,7 @@ describe('Tests using .busted tasks', function()
313
313
local defaultOutput = ' default_output_handler'
314
314
local lpath = ' ./src/?.lua;./src/?/?.lua;./src/?/init.lua'
315
315
local cpath = path .is_windows and ' ./csrc/?.dll;./csrc/?/?.dll;' or ' ./csrc/?.so;./csrc/?/?.so;'
316
- local cli = require ' busted.modules.cli' ({ batch = true , defaultOutput = defaultOutput })
316
+ local cli = require ' busted.modules.cli' ({ standalone = false , defaultOutput = defaultOutput })
317
317
local args = cli :parse ({ ' --directory=spec/.hidden' })
318
318
assert .is_equal (defaultOutput , args .o )
319
319
assert .is_equal (defaultOutput , args .output )
@@ -370,7 +370,7 @@ describe('Tests using .busted tasks', function()
370
370
local defaultOutput = ' default_output_handler'
371
371
local lpath = ' ./src/?.lua;./src/?/?.lua;./src/?/init.lua'
372
372
local cpath = path .is_windows and ' ./csrc/?.dll;./csrc/?/?.dll;' or ' ./csrc/?.so;./csrc/?/?.so;'
373
- local cli = require ' busted.modules.cli' ({ batch = true , defaultOutput = defaultOutput })
373
+ local cli = require ' busted.modules.cli' ({ standalone = false , defaultOutput = defaultOutput })
374
374
local args = cli :parse ({ ' --config-file' , ' spec/.hidden/.busted' })
375
375
assert .is_equal (defaultOutput , args .o )
376
376
assert .is_equal (defaultOutput , args .output )
@@ -424,7 +424,7 @@ describe('Tests using .busted tasks', function()
424
424
end )
425
425
426
426
it (' load configuration options' , function ()
427
- local cli = require ' busted.modules.cli' ({ batch = true , defaultOutput = defaultOutput })
427
+ local cli = require ' busted.modules.cli' ({ standalone = false , defaultOutput = defaultOutput })
428
428
local args = cli :parse ({ ' --directory=spec/.hidden' , ' --run=test' })
429
429
assert .is_equal (' _test%.lua$' , args .pattern )
430
430
assert .is_same ({' tests' }, args .ROOT )
@@ -436,7 +436,7 @@ describe('Tests using .busted tasks', function()
436
436
end )
437
437
438
438
it (' load configuration options and override with command-line' , function ()
439
- local cli = require ' busted.modules.cli' ({ batch = true , defaultOutput = defaultOutput })
439
+ local cli = require ' busted.modules.cli' ({ standalone = false , defaultOutput = defaultOutput })
440
440
local args = cli :parse ({ ' --directory=spec/.hidden' , ' --run=test' , ' -t' , ' tag1' , ' -p' , ' patt' , ' --loaders=moonscript' })
441
441
assert .is_equal (' patt' , args .pattern )
442
442
assert .is_same ({' tag1' }, args .tags )
0 commit comments