neingeist
/
neinomaten
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

18 lines
467 B
Ruby

require 'test/unit'
require 'htree'
class TestRawString < Test::Unit::TestCase
def test_elem
t = HTree.parse("<a>x</a>")
assert_equal("<a>x</a>", t.root.raw_string)
assert_equal("<a>x</a>", t.root.raw_string) # raw_string shouldn't have side effect.
end
def test_no_raw_string
t = HTree::Elem.new('a')
assert_equal(nil, t.raw_string)
t = HTree::Elem.new('a', HTree.parse("<a>x</a>").root)
assert_equal(nil, t.raw_string)
end
end