Add option to filter mkvinfo's output for test cases

This commit is contained in:
Moritz Bunkus 2012-05-06 19:27:06 +02:00
parent 923cda22ff
commit a9be17c8a6

View File

@ -123,6 +123,10 @@ class SimpleTest
:name => full_command_line,
:block => lambda {
sys "../src/mkvmerge #{full_command_line} > #{tmp}", :exit_code => options[:exit_code]
if options[:filter]
text = options[:filter].call(IO.readlines(tmp).join(''))
File.open(tmp, 'w') { |file| file.puts text }
end
options[:keep_tmp] ? hash_file(tmp) : hash_tmp
},
}