From a9be17c8a6af2d0b5edbbddf5bffbb2de066ed8d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 6 May 2012 19:27:06 +0200 Subject: [PATCH] Add option to filter mkvinfo's output for test cases --- tests/test.d/simple_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test.d/simple_test.rb b/tests/test.d/simple_test.rb index dd76dd29b..3bd0e9eed 100644 --- a/tests/test.d/simple_test.rb +++ b/tests/test.d/simple_test.rb @@ -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 }, }