From 661ca07a1bcbe90616f1eaee1087ac9400f1b2a0 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 26 Oct 2013 15:47:25 +0200 Subject: [PATCH] Tests: fail if mkvmerge doesn't support specific locale --- tests/test.d/simple_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test.d/simple_test.rb b/tests/test.d/simple_test.rb index 17fcab5e1..754cd7c11 100644 --- a/tests/test.d/simple_test.rb +++ b/tests/test.d/simple_test.rb @@ -154,14 +154,18 @@ class SimpleTest :name => "mkvmerge UI locale #{locale}", :block => lambda { sys "../src/mkvmerge -o /dev/null --ui-language #{locale} data/avi/v.avi | head -n 2 | tail -n 1 > #{tmp}-#{locale}" - hash_file "#{tmp}-#{locale}" + result = hash_file "#{tmp}-#{locale}" + self.error 'Locale #{locale} not supported by MKVToolNix' if result == 'f54ee70a6ad9bfc5f61de5ba5ca5a3c8' + result }, } @blocks[:tests] << { :name => "mkvinfo UI locale #{locale}", :block => lambda { sys "../src/mkvinfo --ui-language #{locale} data/mkv/complex.mkv | head -n 2 > #{tmp}-#{locale}" - hash_file "#{tmp}-#{locale}" + result = hash_file "#{tmp}-#{locale}" + self.error 'Locale #{locale} not supported by MKVToolNix' if result == 'f54ee70a6ad9bfc5f61de5ba5ca5a3c8' + result }, } end