diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/net/ftp/test_buffered_socket.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/net/ftp/test_buffered_socket.rb b/test/net/ftp/test_buffered_socket.rb index 3cc46fa555..875c53f4e0 100644 --- a/test/net/ftp/test_buffered_socket.rb +++ b/test/net/ftp/test_buffered_socket.rb @@ -33,6 +33,12 @@ class BufferedSocketTest < Test::Unit::TestCase assert_equal("bar", sock.gets) end + def test_read_nil + sock = create_buffered_socket("foo\nbar") + assert_equal("foo\nbar", sock.read) + assert_equal("", sock.read) + end + private def create_buffered_socket(s) |