[前][次][番号順一覧][スレッド一覧]

ruby-changes:65986

From: Shugo <ko1@a...>
Date: Tue, 27 Apr 2021 21:23:30 +0900 (JST)
Subject: [ruby-changes:65986] 2670509ebb (master): [ruby/net-ftp] Add test cases

https://git.ruby-lang.org/ruby.git/commit/?id=2670509ebb

From 2670509ebba5ba31a5bf34cf906943075446e005 Mon Sep 17 00:00:00 2001
From: Shugo Maeda <shugo@r...>
Date: Wed, 21 Apr 2021 10:10:51 +0900
Subject: [ruby/net-ftp] Add test cases

https://github.com/ruby/net-ftp/commit/865232bb2a
---
 test/net/ftp/test_ftp.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb
index 7aa80cd..66c0168 100644
--- a/test/net/ftp/test_ftp.rb
+++ b/test/net/ftp/test_ftp.rb
@@ -2510,6 +2510,12 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2510
   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),
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]