Skip to content

Commit

Permalink
Add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
shugo committed Apr 21, 2021
1 parent ba67330 commit 865232b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/net/ftp/test_ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2510,6 +2510,12 @@ def test_puttextfile_command_injection
end

def test_time_parser
s = "20371231000000"
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0),
Net::FTP::TIME_PARSER[s])
s = "20371231000000.123456"
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0, 123456),
Net::FTP::TIME_PARSER[s])
s = "20371231000000." + "9" * 999999999
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0,
99999999999999999r / 100000000000),
Expand Down

0 comments on commit 865232b

Please sign in to comment.