mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/net-ftp] Add test cases
https://github.com/ruby/net-ftp/commit/865232bb2a
This commit is contained in:
parent
4ae27d8075
commit
2670509ebb
1 changed files with 6 additions and 0 deletions
|
@ -2510,6 +2510,12 @@ EOF
|
|||
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),
|
||||
|
|
Loading…
Reference in a new issue