[前][次][番号順一覧][スレッド一覧]

ruby-changes:1923

From: ko1@a...
Date: 9 Sep 2007 00:59:15 +0900
Subject: [ruby-changes:1923] akr - Ruby:r13414 (trunk): add test for and .

akr	2007-09-09 00:59:05 +0900 (Sun, 09 Sep 2007)

  New Revision: 13414

  Modified files:
    trunk/test/ruby/test_io.rb

  Log:
    add test for [ruby-dev:31650] and [ruby-dev:31659].


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_io.rb?r1=13414&r2=13413

Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 13413)
+++ test/ruby/test_io.rb	(revision 13414)
@@ -35,4 +35,22 @@
     assert_nil r.gets("")
     r.close
   end
+
+  def test_ungetc
+    r, w = IO.pipe
+    w.close
+    assert_raise(IOError, "[ruby-dev:31650]") { 20000.times { r.ungetc "a" } }
+  ensure
+    r.close
+  end
+
+  def test_each_byte
+    r, w = IO.pipe
+    w << "abc def"
+    w.close
+    r.each_byte {|byte| break if byte == 32 }
+    assert_equal("def", r.read, "[ruby-dev:31659]")
+  ensure
+    r.close
+  end
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]