require 'test/unit' require "-test-/printf" class Test_SPrintf < Test::Unit::TestCase def to_s "#{self.class}:#{object_id}" end def inspect "<#{self.class}:#{object_id}>" end def test_int assert_match(/\A<-?\d+>\z/, Bug::Printf.i(self)) end def test_to_str assert_equal("<#{self.class}:#{object_id}>", Bug::Printf.s(self)) end def test_inspect assert_equal("{<#{self.class}:#{object_id}>}", Bug::Printf.v(self)) end end