2012-11-26 23:28:14 -05:00
|
|
|
require 'rdoc/test_case'
|
2010-04-26 23:45:22 -04:00
|
|
|
|
2012-11-26 23:28:14 -05:00
|
|
|
class TestRDocMarkupRaw < RDoc::TestCase
|
2010-04-26 23:45:22 -04:00
|
|
|
|
|
|
|
def setup
|
2012-11-26 23:28:14 -05:00
|
|
|
super
|
|
|
|
|
2010-04-26 23:45:22 -04:00
|
|
|
@p = @RM::Raw.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def mu_pp obj
|
|
|
|
s = ''
|
|
|
|
s = PP.pp obj, s
|
|
|
|
s.force_encoding Encoding.default_external if defined? Encoding
|
|
|
|
s.chomp
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_push
|
|
|
|
@p.push 'hi', 'there'
|
|
|
|
|
|
|
|
assert_equal @RM::Raw.new('hi', 'there'), @p
|
|
|
|
end
|
|
|
|
|
2012-11-26 23:28:14 -05:00
|
|
|
def test_pretty_print
|
|
|
|
assert_equal '[raw: ]', mu_pp(@p)
|
|
|
|
end
|
|
|
|
|
2010-04-26 23:45:22 -04:00
|
|
|
end
|
|
|
|
|