* test/net/ftp/test_ftp.rb: remove unused variables.
test/logger/test_logger.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
87661039e7
commit
72191a0acd
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 16 15:00:28 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||||
|
|
||||||
|
* test/net/ftp/test_ftp.rb: remove unused variables.
|
||||||
|
* test/logger/test_logger.rb: ditto.
|
||||||
|
|
||||||
Sun Feb 16 14:52:46 2014 Eric Wong <e@80x24.org>
|
Sun Feb 16 14:52:46 2014 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
* dir.c (dir_s_glob): RB_GC_GUARD instead of volatile
|
* dir.c (dir_s_glob): RB_GC_GUARD instead of volatile
|
||||||
|
@ -321,7 +321,7 @@ class TestLogDevice < Test::Unit::TestCase
|
|||||||
r, w = IO.pipe
|
r, w = IO.pipe
|
||||||
logdev = d(w)
|
logdev = d(w)
|
||||||
logdev.write("msg2\n\n")
|
logdev.write("msg2\n\n")
|
||||||
read_ready, = IO.select([r], nil, nil, 0.1)
|
IO.select([r], nil, nil, 0.1)
|
||||||
w.close
|
w.close
|
||||||
msg = r.read
|
msg = r.read
|
||||||
r.close
|
r.close
|
||||||
@ -347,7 +347,7 @@ class TestLogDevice < Test::Unit::TestCase
|
|||||||
r, w = IO.pipe
|
r, w = IO.pipe
|
||||||
logdev = d(w)
|
logdev = d(w)
|
||||||
logdev.write("msg2\n\n")
|
logdev.write("msg2\n\n")
|
||||||
read_ready, = IO.select([r], nil, nil, 0.1)
|
IO.select([r], nil, nil, 0.1)
|
||||||
assert(!w.closed?)
|
assert(!w.closed?)
|
||||||
logdev.close
|
logdev.close
|
||||||
assert(w.closed?)
|
assert(w.closed?)
|
||||||
@ -481,7 +481,6 @@ class TestLogDevice < Test::Unit::TestCase
|
|||||||
logfile0 = logfile + '.0'
|
logfile0 = logfile + '.0'
|
||||||
logfile1 = logfile + '.1'
|
logfile1 = logfile + '.1'
|
||||||
logfile2 = logfile + '.2'
|
logfile2 = logfile + '.2'
|
||||||
logfile3 = logfile + '.3'
|
|
||||||
tmpfile.close(true)
|
tmpfile.close(true)
|
||||||
File.unlink(logfile) if File.exist?(logfile)
|
File.unlink(logfile) if File.exist?(logfile)
|
||||||
File.unlink(logfile0) if File.exist?(logfile0)
|
File.unlink(logfile0) if File.exist?(logfile0)
|
||||||
|
@ -428,11 +428,6 @@ class FTPTest < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_list_fail
|
def test_list_fail
|
||||||
commands = []
|
commands = []
|
||||||
list_lines = [
|
|
||||||
"-rw-r--r-- 1 0 0 0 Mar 30 11:22 foo.txt",
|
|
||||||
"-rw-r--r-- 1 0 0 0 Mar 30 11:22 bar.txt",
|
|
||||||
"-rw-r--r-- 1 0 0 0 Mar 30 11:22 baz.txt"
|
|
||||||
]
|
|
||||||
server = create_ftp_server { |sock|
|
server = create_ftp_server { |sock|
|
||||||
sock.print("220 (test_ftp).\r\n")
|
sock.print("220 (test_ftp).\r\n")
|
||||||
commands.push(sock.gets)
|
commands.push(sock.gets)
|
||||||
@ -445,9 +440,6 @@ class FTPTest < Test::Unit::TestCase
|
|||||||
sock.print("200 Switching to ASCII mode.\r\n")
|
sock.print("200 Switching to ASCII mode.\r\n")
|
||||||
line = sock.gets
|
line = sock.gets
|
||||||
commands.push(line)
|
commands.push(line)
|
||||||
port_args = line.slice(/\APORT (.*)/, 1).split(/,/)
|
|
||||||
host = port_args[0, 4].join(".")
|
|
||||||
port = port_args[4, 2].map(&:to_i).inject {|x, y| (x << 8) + y}
|
|
||||||
sock.print("200 PORT command successful.\r\n")
|
sock.print("200 PORT command successful.\r\n")
|
||||||
commands.push(sock.gets)
|
commands.push(sock.gets)
|
||||||
sock.print("553 Requested action not taken.\r\n")
|
sock.print("553 Requested action not taken.\r\n")
|
||||||
@ -589,7 +581,6 @@ class FTPTest < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_retrbinary_fail
|
def test_retrbinary_fail
|
||||||
commands = []
|
commands = []
|
||||||
binary_data = (0..0xff).map {|i| i.chr}.join * 4 * 3
|
|
||||||
server = create_ftp_server { |sock|
|
server = create_ftp_server { |sock|
|
||||||
sock.print("220 (test_ftp).\r\n")
|
sock.print("220 (test_ftp).\r\n")
|
||||||
commands.push(sock.gets)
|
commands.push(sock.gets)
|
||||||
@ -600,9 +591,6 @@ class FTPTest < Test::Unit::TestCase
|
|||||||
sock.print("200 Switching to Binary mode.\r\n")
|
sock.print("200 Switching to Binary mode.\r\n")
|
||||||
line = sock.gets
|
line = sock.gets
|
||||||
commands.push(line)
|
commands.push(line)
|
||||||
port_args = line.slice(/\APORT (.*)/, 1).split(/,/)
|
|
||||||
host = port_args[0, 4].join(".")
|
|
||||||
port = port_args[4, 2].map(&:to_i).inject {|x, y| (x << 8) + y}
|
|
||||||
sock.print("200 PORT command successful.\r\n")
|
sock.print("200 PORT command successful.\r\n")
|
||||||
commands.push(sock.gets)
|
commands.push(sock.gets)
|
||||||
sock.print("550 Requested action not taken.\r\n")
|
sock.print("550 Requested action not taken.\r\n")
|
||||||
@ -678,7 +666,6 @@ class FTPTest < Test::Unit::TestCase
|
|||||||
def test_storbinary_fail
|
def test_storbinary_fail
|
||||||
commands = []
|
commands = []
|
||||||
binary_data = (0..0xff).map {|i| i.chr}.join * 4 * 3
|
binary_data = (0..0xff).map {|i| i.chr}.join * 4 * 3
|
||||||
stored_data = nil
|
|
||||||
server = create_ftp_server { |sock|
|
server = create_ftp_server { |sock|
|
||||||
sock.print("220 (test_ftp).\r\n")
|
sock.print("220 (test_ftp).\r\n")
|
||||||
commands.push(sock.gets)
|
commands.push(sock.gets)
|
||||||
@ -689,9 +676,6 @@ class FTPTest < Test::Unit::TestCase
|
|||||||
sock.print("200 Switching to Binary mode.\r\n")
|
sock.print("200 Switching to Binary mode.\r\n")
|
||||||
line = sock.gets
|
line = sock.gets
|
||||||
commands.push(line)
|
commands.push(line)
|
||||||
port_args = line.slice(/\APORT (.*)/, 1).split(/,/)
|
|
||||||
host = port_args[0, 4].join(".")
|
|
||||||
port = port_args[4, 2].map(&:to_i).inject {|x, y| (x << 8) + y}
|
|
||||||
sock.print("200 PORT command successful.\r\n")
|
sock.print("200 PORT command successful.\r\n")
|
||||||
commands.push(sock.gets)
|
commands.push(sock.gets)
|
||||||
sock.print("452 Requested file action aborted.\r\n")
|
sock.print("452 Requested file action aborted.\r\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user