mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
tests: allow specifying test case to run via file name
This commit is contained in:
parent
05ffcab263
commit
648900e9dd
@ -54,6 +54,9 @@ def main
|
|||||||
controller.show_duration = true
|
controller.show_duration = true
|
||||||
elsif arg =~ /-j(\d+)/
|
elsif arg =~ /-j(\d+)/
|
||||||
controller.num_threads = $1.to_i
|
controller.num_threads = $1.to_i
|
||||||
|
elsif /^ (!)? test-(\d{4}) .* \.rb $/x.match arg
|
||||||
|
method = $1 == '!' ? :exclude_test_case : :add_test_case
|
||||||
|
controller.send(method, $2)
|
||||||
elsif /^ (!)? (\d{1,4}) (?: - (\d{1,4}) )?$/x.match arg
|
elsif /^ (!)? (\d{1,4}) (?: - (\d{1,4}) )?$/x.match arg
|
||||||
method = $1 == '!' ? :exclude_test_case : :add_test_case
|
method = $1 == '!' ? :exclude_test_case : :add_test_case
|
||||||
$2.to_i.upto(($3 || $2).to_i) { |idx| controller.send(method, sprintf("%04d", idx)) }
|
$2.to_i.upto(($3 || $2).to_i) { |idx| controller.send(method, sprintf("%04d", idx)) }
|
||||||
|
Loading…
Reference in New Issue
Block a user