8000 Add test cases · ruby/net-ftp@865232b · GitHub
[go: up one dir, main page]

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)
0