summaryrefslogtreecommitdiff
path: root/test/net/ftp
diff options
context:
space:
mode:
authorShugo Maeda <shugo@ruby-lang.org>2021-04-21 10:10:51 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-04-27 21:22:42 +0900
commit2670509ebba5ba31a5bf34cf906943075446e005 (patch)
tree3622a7c5dfd09c0dbdff2f73661ca1d5b450460c /test/net/ftp
parent4ae27d8075b2d138d13cb2b112f0ee50934b3017 (diff)
[ruby/net-ftp] Add test cases
https://github.com/ruby/net-ftp/commit/865232bb2a
Diffstat (limited to 'test/net/ftp')
-rw-r--r--test/net/ftp/test_ftp.rb6
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),