mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
test base class: method for identifying file & returning parsed JSON
This commit is contained in:
parent
cc06e3fa53
commit
f21b7ca87d
@ -236,6 +236,17 @@ class SimpleTest
|
||||
self.sys command, :exit_code => options[:exit_code]
|
||||
end
|
||||
|
||||
def identify_json *args
|
||||
options = args.extract_options!
|
||||
fail ArgumentError if args.empty?
|
||||
|
||||
command = "../src/mkvmerge --identify --identification-format json --engage no_variable_data #{args.first}"
|
||||
|
||||
output, _ = self.sys(command, :exit_code => options[:exit_code])
|
||||
|
||||
return JSON.load(output.join(''))
|
||||
end
|
||||
|
||||
def info *args
|
||||
options = args.extract_options!
|
||||
fail ArgumentError if args.empty?
|
||||
|
Loading…
Reference in New Issue
Block a user