From 01657b51f8ff145e425feb5fee39481be735cb4d Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 15 Mar 2010 08:43:45 +0000 Subject: * io.c (rb_io_print): RDoc update. a patch from Daniel Kelley in [ruby-core:28643]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index a8860e1654..2da2ae95e6 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1396,6 +1396,23 @@ End assert_in_out_err(["-", t.path], "print while $<.gets", %w(foo bar baz), []) end + def test_print_separators + $, = ':' + $\ = "\n" + r, w = IO.pipe + w.print('a') + w.print('a','b','c') + w.close + assert_equal("a\n", r.gets) + assert_equal("a:b:c\n", r.gets) + assert_nil r.gets + r.close + + ensure + $, = nil + $\ = nil + end + def test_putc pipe(proc do |w| w.putc "A" -- cgit v1.2.3