test/filemagic_test.rb in ruby-filemagic-0.7.2 vs test/filemagic_test.rb in ruby-filemagic-0.7.3

- old
+ new

@@ -128,11 +128,14 @@ def test_check_compiled return if MAGIC_VERSION <= 5.09 fm = FileMagic.new(FileMagic::MAGIC_NONE) res = silence_stderr { fm.check(path_to('perl.mgc')) } fm.close - assert(res) + assert(match_version( + 0 => res, + 5.39 => !res + )) end def test_compile assert(File.writable?('.'), "can't write to current directory") fm = FileMagic.new(FileMagic::MAGIC_NONE) @@ -236,10 +239,11 @@ assert fm.simplified? assert_equal('text/plain', fm.file(path_to('perl'))) assert_equal(match_version( 0 => 'application/vnd.ms-office', 5.11 => 'application/msword', - 5.14 => 'application/vnd.ms-office' + 5.14 => 'application/vnd.ms-office', + 5.39 => 'application/vnd.ms-excel' ), fm.file(path_to('excel-example.xls'))) end def test_singleton fm1 = FileMagic.fm