Skip to content

Commit

Permalink
✅ Fix decode utf-7 test for ruby 2.6
Browse files Browse the repository at this point in the history
Because the `v0.3-bugfixes` branch doesn't have the latest version of
`core_assertions`, we can't use `assert_linear_performance`.  It's
enough for me that it *is* tested in the `master` branch, although that
won't test against ruby 2.6.
  • Loading branch information
nevans committed Jun 12, 2023
1 parent 4a8af94 commit 7a60c8f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/net/imap/test_imap_data_encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ def test_decode_utf7
utf8 = "\357\274\241\357\274\242\357\274\243".dup.force_encoding("UTF-8")
assert_equal(utf8, s)

assert_linear_performance([1, 10, 100], pre: ->(n) {'&'*(n*1_000)}) do |s|
Net::IMAP.decode_utf7(s)
end
# This assertion is not in the current version of core_assertions. The fix
# has been backported to v0.3.5, but only tested in master and v0.4.0+.
#
# assert_linear_performance([1, 10, 100], pre: ->(n) {'&'*(n*1_000)}) do |s|
# Net::IMAP.decode_utf7(s)
# end
end

def test_encode_date
Expand Down

0 comments on commit 7a60c8f

Please sign in to comment.