mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
tests: add SimpleTest#test_info method
This commit is contained in:
parent
a8a1e26193
commit
30af0c578a
13
tests/test-265mkvinfo_clusters_with_unknown_size.rb
Normal file → Executable file
13
tests/test-265mkvinfo_clusters_with_unknown_size.rb
Normal file → Executable file
@ -1,13 +1,4 @@
|
||||
#!/usr/bin/ruby -w
|
||||
|
||||
class T_265mkvinfo_clusters_with_unknown_size < Test
|
||||
def description
|
||||
return "mkvinfo / Clusters with an unknown size"
|
||||
end
|
||||
|
||||
def run
|
||||
sys "../src/mkvinfo -v -v -z --ui-language en_US data/webm/live-stream.webm > #{tmp}"
|
||||
return hash_tmp
|
||||
end
|
||||
end
|
||||
|
||||
describe "mkvinfo / Clusters with an unknown size"
|
||||
test_info "data/webm/live-stream.webm", :args => "-v -v -z"
|
||||
|
@ -133,6 +133,20 @@ class SimpleTest
|
||||
}
|
||||
end
|
||||
|
||||
def test_info file, *args
|
||||
options = args.extract_options!
|
||||
full_command_line = [ options[:args], file ].flatten.join(' ')
|
||||
options[:name] ||= full_command_line
|
||||
@blocks[:tests] << {
|
||||
:name => full_command_line,
|
||||
:block => lambda {
|
||||
output = options[:output] || tmp
|
||||
info full_command_line, :exit_code => options[:exit_code], :output => output
|
||||
options[:keep_tmp] ? hash_file(output) : hash_tmp
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
def test_merge_unsupported file, *args
|
||||
options = args.extract_options!
|
||||
full_command_line = [ options[:args], file ].flatten.join(' ')
|
||||
|
Loading…
Reference in New Issue
Block a user