Skip to content

Commit

Permalink
xpath: add a test for XPathParser#abbreviate
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed May 28, 2023
1 parent 8a995dc commit 0eddba8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/parser/test_xpath.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: false

require "test/unit"
require "rexml/parsers/xpathparser"

module REXMLTests
class TestXPathParser < Test::Unit::TestCase
sub_test_case("#abbreviate") do
def abbreviate(xpath)
parser = REXML::Parsers::XPathParser.new
parser.abbreviate(xpath)
end

def test_document
assert_equal("/",
abbreviate("/"))
end
end
end
end

0 comments on commit 0eddba8

Please sign in to comment.