mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mkcdtmpdir doesn't yield a value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a0e0e30864
commit
297f3249d9
1 changed files with 9 additions and 9 deletions
|
@ -108,7 +108,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream
|
def test_copy_stream
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
|
|
||||||
content = "foobar"
|
content = "foobar"
|
||||||
File.open("src", "w") {|f| f << content }
|
File.open("src", "w") {|f| f << content }
|
||||||
|
@ -322,7 +322,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream_rbuf
|
def test_copy_stream_rbuf
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
with_pipe {|r, w|
|
with_pipe {|r, w|
|
||||||
File.open("foo", "w") {|f| f << "abcd" }
|
File.open("foo", "w") {|f| f << "abcd" }
|
||||||
File.open("foo") {|f|
|
File.open("foo") {|f|
|
||||||
|
@ -347,7 +347,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_copy_stream_socket
|
def test_copy_stream_socket
|
||||||
return unless defined? UNIXSocket
|
return unless defined? UNIXSocket
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
|
|
||||||
content = "foobar"
|
content = "foobar"
|
||||||
File.open("src", "w") {|f| f << content }
|
File.open("src", "w") {|f| f << content }
|
||||||
|
@ -450,7 +450,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream_fname_to_strio
|
def test_copy_stream_fname_to_strio
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
File.open("foo", "w") {|f| f << "abcd" }
|
File.open("foo", "w") {|f| f << "abcd" }
|
||||||
src = "foo"
|
src = "foo"
|
||||||
dst = StringIO.new
|
dst = StringIO.new
|
||||||
|
@ -461,7 +461,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream_strio_to_fname
|
def test_copy_stream_strio_to_fname
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
# StringIO to filename
|
# StringIO to filename
|
||||||
src = StringIO.new("abcd")
|
src = StringIO.new("abcd")
|
||||||
ret = IO.copy_stream(src, "fooo", 3)
|
ret = IO.copy_stream(src, "fooo", 3)
|
||||||
|
@ -472,7 +472,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream_io_to_strio
|
def test_copy_stream_io_to_strio
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
# IO to StringIO
|
# IO to StringIO
|
||||||
File.open("bar", "w") {|f| f << "abcd" }
|
File.open("bar", "w") {|f| f << "abcd" }
|
||||||
File.open("bar") {|src|
|
File.open("bar") {|src|
|
||||||
|
@ -486,7 +486,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream_strio_to_io
|
def test_copy_stream_strio_to_io
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
# StringIO to IO
|
# StringIO to IO
|
||||||
src = StringIO.new("abcd")
|
src = StringIO.new("abcd")
|
||||||
ret = File.open("baz", "w") {|dst|
|
ret = File.open("baz", "w") {|dst|
|
||||||
|
@ -524,7 +524,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream_src_wbuf
|
def test_copy_stream_src_wbuf
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
with_pipe {|r, w|
|
with_pipe {|r, w|
|
||||||
File.open("foe", "w+") {|f|
|
File.open("foe", "w+") {|f|
|
||||||
f.write "abcd\n"
|
f.write "abcd\n"
|
||||||
|
@ -541,7 +541,7 @@ class TestIO < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copy_stream_dst_rbuf
|
def test_copy_stream_dst_rbuf
|
||||||
mkcdtmpdir {|d|
|
mkcdtmpdir {
|
||||||
with_pipe {|r, w|
|
with_pipe {|r, w|
|
||||||
w << "xyz"
|
w << "xyz"
|
||||||
w.close
|
w.close
|
||||||
|
|
Loading…
Add table
Reference in a new issue