We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72f2271 commit d829f16Copy full SHA for d829f16
test/uri/test_common.rb
@@ -112,6 +112,17 @@ def test_kernel_uri
112
assert_raise(NoMethodError) { Object.new.URI("http://www.ruby-lang.org/") }
113
end
114
115
+ def test_parse_timeout
116
+ pre = ->(n) {
117
+ 'https://example.com/dir/' + 'a' * (n * 100) + '/##.jpg'
118
+ }
119
+ assert_linear_performance((1..10).map {|i| i * 100}, pre: pre) do |uri|
120
+ assert_raise(URI::InvalidURIError) do
121
+ URI.parse(uri)
122
+ end
123
124
125
+
126
def test_encode_www_form_component
127
assert_equal("%00+%21%22%23%24%25%26%27%28%29*%2B%2C-.%2F09%3A%3B%3C%3D%3E%3F%40" \
128
"AZ%5B%5C%5D%5E_%60az%7B%7C%7D%7E",
0 commit comments