diff options
Diffstat (limited to 'test/net')
-rw-r--r-- | test/net/ftp/test_ftp.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index 7aa80cdcb8..66c0168967 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -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), |