Skip to content

Commit 865232b

Browse files
committed
Add test cases
1 parent ba67330 commit 865232b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/net/ftp/test_ftp.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,6 +2510,12 @@ def test_puttextfile_command_injection
25102510
end
25112511

25122512
def test_time_parser
2513+
s = "20371231000000"
2514+
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0),
2515+
Net::FTP::TIME_PARSER[s])
2516+
s = "20371231000000.123456"
2517+
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0, 123456),
2518+
Net::FTP::TIME_PARSER[s])
25132519
s = "20371231000000." + "9" * 999999999
25142520
assert_equal(Time.utc(2037, 12, 31, 0, 0, 0,
25152521
99999999999999999r / 100000000000),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy