From 5425099a9f536d52fa61bb78d97e79c48368390a Mon Sep 17 00:00:00 2001 From: shugo Date: Mon, 14 Sep 2015 10:27:28 +0000 Subject: * lib/net/ftp.rb (parse_mlsx_entry): parse pathnames including space correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/net/ftp/test_ftp.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/net') diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index 711bbab6f7..9fc163bc7b 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -1191,7 +1191,7 @@ EOF def test_mlsd commands = [] entry_lines = [ - "Type=file;Unique=FC00U1E554A;Size=1234567;Modify=20131220035929.123456;Perm=r; foo", + "Type=file;Unique=FC00U1E554A;Size=1234567;Modify=20131220035929.123456;Perm=r; foo bar", "Type=cdir;Unique=FC00U1E554B;Modify=20131220035929;Perm=flcdmpe; .", "Type=pdir;Unique=FC00U1E554C;Modify=20131220035929;Perm=flcdmpe; ..", ] @@ -1237,7 +1237,7 @@ EOF assert_equal("TYPE I\r\n", commands.shift) entries = ftp.mlsd("/") assert_equal(3, entries.size) - assert_equal("foo", entries[0].pathname) + assert_equal("foo bar", entries[0].pathname) assert_equal(".", entries[1].pathname) assert_equal("..", entries[2].pathname) assert_equal("file", entries[0].facts["type"]) -- cgit v1.2.3