mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
Helper method SimpleTest::test_identify for "mkvmerge --identify[-verbose]"
This commit is contained in:
parent
403a2d6bb5
commit
16c6dc95e0
@ -1,13 +1,8 @@
|
||||
#!/usr/bin/ruby -w
|
||||
|
||||
class T_285h264_misdetected_as_mp3 < Test
|
||||
def description
|
||||
"mkvmerge / h264 ES mis-detected as MP3"
|
||||
end
|
||||
class T_285h264_misdetected_as_mp3 < SimpleTest
|
||||
describe "mkvmerge / h264 ES mis-detected as MP3"
|
||||
|
||||
def run
|
||||
sys "../src/mkvmerge --identify-verbose data/h264/bug574.h264 > #{tmp}", 0
|
||||
hash_tmp
|
||||
end
|
||||
test_identify "data/h264/bug574.h264"
|
||||
end
|
||||
|
||||
|
@ -84,6 +84,20 @@ class SimpleTest
|
||||
}
|
||||
end
|
||||
|
||||
def self.test_identify file, *args
|
||||
options = args.extract_options!
|
||||
options[:verbose] = true if options[:verbose].nil?
|
||||
full_command_line = [ options[:verbose] ? "--identify-verbose" : "--identify", options[:args], file ].flatten.join(' ')
|
||||
options[:name] ||= full_command_line
|
||||
@@blocks[:tests] << {
|
||||
:name => full_command_line,
|
||||
:block => lambda {
|
||||
sys "../src/mkvmerge #{full_command_line} > #{tmp}", 0
|
||||
hash_tmp
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
def self.description
|
||||
@@description || fail("Class #{self.class.name} misses its description")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user