Skip to content

Commit 0eddba8

Browse files
committed
xpath: add a test for XPathParser#abbreviate
1 parent 8a995dc commit 0eddba8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/parser/test_xpath.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# frozen_string_literal: false
2+
3+
require "test/unit"
4+
require "rexml/parsers/xpathparser"
5+
6+
module REXMLTests
7+
class TestXPathParser < Test::Unit::TestCase
8+
sub_test_case("#abbreviate") do
9+
def abbreviate(xpath)
10+
parser = REXML::Parsers::XPathParser.new
11+
parser.abbreviate(xpath)
12+
end
13+
14+
def test_document
15+
assert_equal("/",
16+
abbreviate("/"))
17+
end
18+
end
19+
end
20+
end

0 commit comments

Comments
 (0)