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

ruby-changes:56700

From: Nobuyoshi <ko1@a...>
Date: Tue, 30 Jul 2019 12:40:24 +0900 (JST)
Subject: [ruby-changes:56700] Nobuyoshi Nakada: 3805ef7fb5 (master): Separate test_set_lineno_gets

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

From 3805ef7fb57136be46fceb693340981c75eb8ec1 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 30 Jul 2019 12:39:28 +0900
Subject: Separate test_set_lineno_gets


diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 0c81f4c..49da709 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1717,23 +1717,25 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L1717
           f.gets; assert_equal(3, $.)
         end
       SRC
-
-      pipe(proc do |w|
-        w.puts "foo"
-        w.puts "bar"
-        w.puts "baz"
-        w.close
-      end, proc do |r|
-        r.gets; assert_equal(1, $.)
-        r.gets; assert_equal(2, $.)
-        r.lineno = 1000; assert_equal(2, $.)
-        r.gets; assert_equal(1001, $.)
-        r.gets; assert_equal(1001, $.)
-      end)
     }
   end
 
-  def test_readline
+  def test_set_lineno_gets
+    pipe(proc do |w|
+      w.puts "foo"
+      w.puts "bar"
+      w.puts "baz"
+      w.close
+    end, proc do |r|
+      r.gets; assert_equal(1, $.)
+      r.gets; assert_equal(2, $.)
+      r.lineno = 1000; assert_equal(2, $.)
+      r.gets; assert_equal(1001, $.)
+      r.gets; assert_equal(1001, $.)
+    end)
+  end
+
+  def test_set_lineno_readline
     pipe(proc do |w|
       w.puts "foo"
       w.puts "bar"
-- 
cgit v0.10.2


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

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