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

ruby-changes:65150

From: Charles <ko1@a...>
Date: Fri, 5 Feb 2021 12:30:53 +0900 (JST)
Subject: [ruby-changes:65150] a1cc044ea1 (master): [ruby/io-console] Use omit instead of skip

https://git.ruby-lang.org/ruby.git/commit/?id=a1cc044ea1

From a1cc044ea18daa3b2f49d6c74095cb94c00cbc5a Mon Sep 17 00:00:00 2001
From: Charles Oliver Nutter <headius@h...>
Date: Thu, 4 Feb 2021 15:03:12 -0600
Subject: [ruby/io-console] Use omit instead of skip

This test runs with test/unit now, which defines omit instead of
skip.

https://github.com/ruby/io-console/commit/bd731d0b8d
---
 test/io/console/test_io_console.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index ccc9c7c..2121fcd 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -35,7 +35,7 @@ class TestIO_Console < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L35
       Errno.const_get(e) if Errno.const_defined?(e)
     }
     exceptions.compact!
-    skip if exceptions.empty?
+    omit if exceptions.empty?
     File.open(IO::NULL) do |f|
       e = assert_raise(*exceptions) do
         f.echo?
@@ -226,7 +226,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L226
   end
 
   def test_getpass
-    skip unless IO.method_defined?("getpass")
+    omit unless IO.method_defined?("getpass")
     run_pty("p IO.console.getpass('> ')") do |r, w|
       assert_equal("> ", r.readpartial(10))
       sleep 0.1
@@ -412,7 +412,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L412
   def helper
     m, s = PTY.open
   rescue RuntimeError
-    skip $!
+    omit $!
   else
     yield m, s
   ensure
@@ -423,7 +423,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L423
   def run_pty(src, n = 1)
     r, w, pid = PTY.spawn(EnvUtil.rubybin, "-I#{TestIO_Console::PATHS.join(File::PATH_SEPARATOR)}", "-rio/console", "-e", src)
   rescue RuntimeError
-    skip $!
+    omit $!
   else
     if block_given?
       yield r, w, pid
-- 
cgit v1.1


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

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