File: test_invalid_rational.rb

package info (click to toggle)
ruby-mini-exiftool 2.9.0-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 688 kB
  • sloc: ruby: 2,616; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 378 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
# -- encoding: utf-8 --
require 'helpers_for_test'

class TestInvalidRational < TestCase

  def test_rescue_from_invalid_rational
    mini_exiftool = MiniExiftool.from_json(File.read('test/data/invalid_rational.json'))
    assert_equal '1/0', mini_exiftool.user_comment
  rescue Exception
    assert false, 'Tag values of the form x/0 should not raise an Exception.'
  end

end