mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
tests: run ebml_validator after mkvpropedit if it exists
This commit is contained in:
parent
649b331c88
commit
56357aa31c
2
tests/test-370propedit_attachments.rb
Normal file → Executable file
2
tests/test-370propedit_attachments.rb
Normal file → Executable file
@ -47,7 +47,7 @@ test "several" do
|
||||
commands.each do |command|
|
||||
sys "cp #{src} #{work}"
|
||||
hashes << hash_file(work)
|
||||
propedit "#{work} #{command}"
|
||||
propedit work, command
|
||||
hashes << hash_file(work)
|
||||
end
|
||||
|
||||
|
@ -14,6 +14,6 @@ end
|
||||
|
||||
test "propedit" do
|
||||
sys "cp #{file} #{tmp}"
|
||||
propedit "#{tmp} --replace-attachment '=0:data/text/chap1.txt'"
|
||||
propedit tmp, "--replace-attachment '=0:data/text/chap1.txt'"
|
||||
hash_tmp
|
||||
end
|
||||
|
@ -7,7 +7,7 @@ test "data/mkv/no-track-uid.mks" do
|
||||
sys "cp data/mkv/no-track-uid.mks #{tmp}"
|
||||
hashes << hash_tmp(false)
|
||||
|
||||
propedit "#{tmp} --edit track:s1 --set name=chunky-bacon"
|
||||
propedit tmp, "--edit track:s1 --set name=chunky-bacon"
|
||||
hashes << hash_tmp(false)
|
||||
|
||||
hashes.join '-'
|
||||
|
@ -248,12 +248,16 @@ class SimpleTest
|
||||
self.sys command, :exit_code => options[:exit_code]
|
||||
end
|
||||
|
||||
def propedit *args
|
||||
def propedit file_name, *args
|
||||
options = args.extract_options!
|
||||
fail ArgumentError if args.empty?
|
||||
|
||||
command = "../src/mkvpropedit --engage no_variable_data #{args.first}"
|
||||
self.sys command, :exit_code => options[:exit_code]
|
||||
command = "../src/mkvpropedit --engage no_variable_data #{file_name} #{args.first}"
|
||||
*result = self.sys command, :exit_code => options[:exit_code]
|
||||
|
||||
self.sys "../src/tools/ebml_validator -M #{file_name}" if FileTest.exists?("../src/tools/ebml_validator")
|
||||
|
||||
return *result
|
||||
end
|
||||
|
||||
def sys *args
|
||||
|
@ -116,8 +116,14 @@ class Test
|
||||
retcode = args.detect { |a| !a.is_a? String } || 0
|
||||
args.reject! { |a| !a.is_a? String }
|
||||
|
||||
command = "../src/mkvpropedit --engage no_variable_data " + (args.size == 1 ? tmp : args.shift) + " " + args.shift
|
||||
sys command, retcode
|
||||
file_name = args.size == 1 ? tmp : args.shift
|
||||
|
||||
command = "../src/mkvpropedit --engage no_variable_data #{file_name} #{args.shift}"
|
||||
*result = sys command, retcode
|
||||
|
||||
sys "../src/tools/ebml_validator -M #{file_name}" if FileTest.exists?("../src/tools/ebml_validator")
|
||||
|
||||
return *result
|
||||
end
|
||||
|
||||
def xtr_tracks_s(*args)
|
||||
|
Loading…
Reference in New Issue
Block a user