Skip to content

Commit

Permalink
Rename and switch RFC2396_PARSER test
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jul 18, 2024
1 parent 0ab9abb commit 2e0f73f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/uri/test_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def test_compare
assert(!u2.equal?(u3))
end

def test_parse
def test_parse_rfc2396_parser
URI.parser = URI::RFC2396_PARSER

escaped = URI::REGEXP::PATTERN::ESCAPED
hex = URI::REGEXP::PATTERN::HEX
p1 = URI::Parser.new(:ESCAPED => "(?:#{escaped}|%u[#{hex}]{4})")
Expand All @@ -43,6 +45,8 @@ def test_parse
u1.path = '/%uDCBA'
assert_equal(['http', nil, 'a', URI::HTTP.default_port, '/%uDCBA', nil, nil],
uri_to_ary(u1))
ensure
URI.parser = URI::DEFAULT_PARSER
end

def test_parse_query_pct_encoded
Expand Down

0 comments on commit 2e0f73f

Please sign in to comment.