Add function for running mkvpropedit in tests easily

This commit is contained in:
Moritz Bunkus 2011-12-03 15:07:24 +01:00
parent f4e6a17a2c
commit 2b5ec42425
2 changed files with 9 additions and 1 deletions

View File

@ -304,6 +304,14 @@ class Test
sys command, retcode sys command, retcode
end end
def propedit *args
retcode = args.detect { |a| !a.is_a? String } || 0
args.reject! { |a| !a.is_a? String }
command = "../src/mkvpropedit " + (args.size == 1 ? tmp : args.shift) + " " + args.shift
sys command, retcode
end
def xtr_tracks_s(*args) def xtr_tracks_s(*args)
command = "../src/mkvextract tracks data/mkv/complex.mkv --no-variable-data " + args.join(" ") + ":#{tmp}" command = "../src/mkvextract tracks data/mkv/complex.mkv --no-variable-data " + args.join(" ") + ":#{tmp}"
sys command, 0 sys command, 0

View File

@ -7,7 +7,7 @@ class T_280replace_one_byte_with_ebmlvoid < Test
def run def run
sys "cp data/mkv/sample-bug536.mkv #{tmp}" sys "cp data/mkv/sample-bug536.mkv #{tmp}"
sys "../src/mkvpropedit #{tmp} --edit track:v1 --set display-width=1600 --set display-height=768" propedit "--edit track:v1 --set display-width=1600 --set display-height=768"
hash_tmp hash_tmp
end end
end end