mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
SimpleTest class: avoid a couple of warnings
This commit is contained in:
parent
616f17bac5
commit
31bc8633d4
@ -126,7 +126,7 @@ class SimpleTest
|
|||||||
sys "../src/mkvmerge #{full_command_line} > #{tmp}", :exit_code => options[:exit_code]
|
sys "../src/mkvmerge #{full_command_line} > #{tmp}", :exit_code => options[:exit_code]
|
||||||
if options[:filter]
|
if options[:filter]
|
||||||
text = options[:filter].call(IO.readlines(tmp).join(''))
|
text = options[:filter].call(IO.readlines(tmp).join(''))
|
||||||
File.open(tmp, 'w') { |file| file.puts text }
|
File.open(tmp, 'w') { |tmp_file| tmp_file.puts text }
|
||||||
end
|
end
|
||||||
options[:keep_tmp] ? hash_file(tmp) : hash_tmp
|
options[:keep_tmp] ? hash_file(tmp) : hash_tmp
|
||||||
},
|
},
|
||||||
@ -163,7 +163,6 @@ class SimpleTest
|
|||||||
def test_ui_locale locale, *args
|
def test_ui_locale locale, *args
|
||||||
describe "mkvmerge / UI locale: #{locale}"
|
describe "mkvmerge / UI locale: #{locale}"
|
||||||
|
|
||||||
options = args.extract_options!
|
|
||||||
@blocks[:tests] << {
|
@blocks[:tests] << {
|
||||||
:name => "mkvmerge UI locale #{locale}",
|
:name => "mkvmerge UI locale #{locale}",
|
||||||
:block => lambda {
|
:block => lambda {
|
||||||
@ -189,7 +188,7 @@ class SimpleTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def run_test
|
def run_test
|
||||||
@blocks[:setup].each &:call
|
@blocks[:setup].each(&:call)
|
||||||
|
|
||||||
results = @blocks[:tests].collect do |test|
|
results = @blocks[:tests].collect do |test|
|
||||||
result = nil
|
result = nil
|
||||||
@ -201,7 +200,7 @@ class SimpleTest
|
|||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
@blocks[:cleanup].each &:call
|
@blocks[:cleanup].each(&:call)
|
||||||
|
|
||||||
unlink_tmp_files
|
unlink_tmp_files
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user