summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-07-18 10:27:25 +0900
committergit <svn-admin@ruby-lang.org>2024-07-19 00:50:36 +0000
commit862041d0546df6618e19a32051661ff39a7ffcb2 (patch)
treed7ed4358bda3bf33ec51257c7faa71eeca92933c
parentce4da88a579ed0421c36cf7c48acc9d1a7b05079 (diff)
[ruby/uri] Rename and switch RFC2396_PARSER test
https://github.com/ruby/uri/commit/2e0f73f05e
-rw-r--r--test/uri/test_parser.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/uri/test_parser.rb b/test/uri/test_parser.rb
index f400de20a8..9105d47f7b 100644
--- a/test/uri/test_parser.rb
+++ b/test/uri/test_parser.rb
@@ -33,7 +33,9 @@ class URI::TestParser < Test::Unit::TestCase
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})")
@@ -43,6 +45,8 @@ class URI::TestParser < Test::Unit::TestCase
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