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

ruby-changes:17325

From: shyouhei <ko1@a...>
Date: Fri, 24 Sep 2010 14:37:24 +0900 (JST)
Subject: [ruby-changes:17325] Ruby:r29330 (trunk): * test/test_pty.rb: Same as 229281; existence of PTY class do not

shyouhei	2010-09-24 14:25:55 +0900 (Fri, 24 Sep 2010)

  New Revision: 29330

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29330

  Log:
    * test/test_pty.rb: Same as 229281; existence of PTY class do not
      guarantee a successful pty operation.

  Modified files:
    trunk/ChangeLog
    trunk/test/test_pty.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29329)
+++ ChangeLog	(revision 29330)
@@ -1,3 +1,8 @@
+Fri Sep 24 14:19:12 2010  URABE Shyouhei  <shyouhei@r...>
+
+	* test/test_pty.rb: Same as 229281; existence of PTY class do not
+	  guarantee a successful pty operation.
+
 Thu Sep 23 23:09:08 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_insnhelper.c (vm_get_cref0): cref is stacked only in normal
Index: test/test_pty.rb
===================================================================
--- test/test_pty.rb	(revision 29329)
+++ test/test_pty.rb	(revision 29330)
@@ -13,6 +13,9 @@
 
   def test_spawn_without_block
     r, w, pid = PTY.spawn(RUBY, '-e', 'puts "a"')
+  rescue RuntimeError
+    skip $!
+  else
     assert_equal("a\r\n", r.gets)
   ensure
     Process.wait pid if pid
@@ -23,6 +26,8 @@
       assert_equal("b\r\n", r.gets)
       Process.wait(pid)
     }
+  rescue RuntimeError
+    skip $!
   end
 
   def test_commandline
@@ -31,6 +36,8 @@
       assert_equal("foo\r\n", r.gets)
       Process.wait(pid)
     }
+  rescue RuntimeError
+    skip $!
   end
 
   def test_argv0
@@ -38,10 +45,15 @@
       assert_equal("bar\r\n", r.gets)
       Process.wait(pid)
     }
+  rescue RuntimeError
+    skip $!
   end
 
   def test_open_without_block
     ret = PTY.open
+  rescue RuntimeError
+    skip $!
+  else
     assert_kind_of(Array, ret)
     assert_equal(2, ret.length)
     assert_equal(IO, ret[0].class)
@@ -70,6 +82,9 @@
       assert(File.chardev?(slave.path))
       x
     }
+  rescue RuntimeError
+    skip $!
+  else
     assert(r[0].closed?)
     assert(r[1].closed?)
     assert_equal(y, x)
@@ -82,6 +97,9 @@
       assert(slave.closed?)
       assert(master.closed?)
     }
+  rescue RuntimeError
+    skip $!
+  else
     assert_nothing_raised {
       PTY.open {|master, slave|
         slave.close
@@ -97,6 +115,8 @@
       master.puts "bar"
       assert_equal("bar", slave.gets.chomp)
     }
+  rescue RuntimeError
+    skip $!
   end
 
   def test_stat_slave
@@ -105,6 +125,8 @@
       assert_equal(Process.uid, s.uid)
       assert_equal(0600, s.mode & 0777)
     }
+  rescue RuntimeError
+    skip $!
   end
 
   def test_close_master
@@ -112,6 +134,8 @@
       master.close
       assert_raise(EOFError) { slave.readpartial(10) }
     }
+  rescue RuntimeError
+    skip $!
   end
 
   def test_close_slave
@@ -123,6 +147,8 @@
         Errno::EIO      # GNU/Linux
       ) { master.readpartial(10) }
     }
+  rescue RuntimeError
+    skip $!
   end
 
   def test_getpty_nonexistent

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

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