File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -213,16 +213,18 @@ def test_check_to
213
213
def test_email_regexp
214
214
re = URI ::MailTo ::EMAIL_REGEXP
215
215
216
- rate = 1000
216
+ repeat = 10
217
217
longlabel = '.' + 'invalid' . ljust ( 63 , 'd' )
218
218
endlabel = ''
219
- pre = -> ( n ) { 'a@invalid' + longlabel *( n *rate ) + endlabel }
220
- assert_linear_performance ( 1 ..10 , pre : pre ) do |to |
221
- re =~ to or flunk
219
+ seq = ( 1 ..3 ) . map { |i | 10 **i }
220
+ rehearsal = 10
221
+ pre = -> ( n ) { 'a@invalid' + longlabel *( n ) + endlabel }
222
+ assert_linear_performance ( seq , rehearsal : rehearsal , pre : pre ) do |to |
223
+ repeat . times { re =~ to or flunk }
222
224
end
223
225
endlabel = '.' + 'email' . rjust ( 64 , 'd' )
224
- assert_linear_performance ( 1 .. 10 , pre : pre ) do |to |
225
- re =~ to and flunk
226
+ assert_linear_performance ( seq , rehearsal : rehearsal , pre : pre ) do |to |
227
+ repeat . times { re =~ to and flunk }
226
228
end
227
229
end
228
230
You can’t perform that action at this time.
0 commit comments