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

ruby-changes:53209

From: naruse <ko1@a...>
Date: Mon, 29 Oct 2018 02:03:43 +0900 (JST)
Subject: [ruby-changes:53209] naruse:r65424 (trunk): Revert "Add test for cause on pty"

naruse	2018-10-29 02:03:36 +0900 (Mon, 29 Oct 2018)

  New Revision: 65424

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65424

  Log:
    Revert "Add test for cause on pty"
    
    This reverts commit r65422.

  Modified files:
    trunk/test/ruby/test_backtrace.rb
Index: test/ruby/test_backtrace.rb
===================================================================
--- test/ruby/test_backtrace.rb	(revision 65423)
+++ test/ruby/test_backtrace.rb	(revision 65424)
@@ -1,7 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_backtrace.rb#L1
 # frozen_string_literal: false
 require 'test/unit'
 require 'tempfile'
-require 'pty'
 
 class TestBacktrace < Test::Unit::TestCase
   def test_exception
@@ -322,54 +321,6 @@ class TestBacktrace < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/ruby/test_backtrace.rb#L321
     def foo
       raise "foo!"
     end
-    def bar
-      foo
-    rescue
-      raise "bar!"
-    end
-    bar
-    end;
-  end
-
-  def assert_pty(args, test_stdin = "", dummy, expected)
-    actual = nil
-    PTY.spawn(EnvUtil.rubybin, *args) do |r, w, pid|
-      w.puts test_stdin
-      w.puts "__END__"
-      w.close
-      actual = r.read
-    end
-    expected = test_stdin.chomp + "\n__END__\n" + expected.to_s
-    expected.gsub!(/\n/, "\r\n")
-    assert_equal expected, actual
-  end
-
-  def test_tty_backtrace
-    err = "\e[1mTraceback\e[m (most recent call last):\n" +
-           "-:1:in `<main>': \e[1m\e[1;4munhandled exception\e[m\n"
-    assert_pty([], "raise", [], err)
-
-    err = "\e[1mTraceback\e[m (most recent call last):\n" +
-      "\t1: from -:4:in `<main>'\n" +
-      "-:2:in `foo': \e[1mfoo! (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n"
-    assert_pty([], <<-"end;", [], err)
-    def foo
-      raise "foo!"
-    end
-    foo
-    end;
-
-    err = "\e[1mTraceback\e[m (most recent call last):\n" +
-      "\t2: from -:9:in `<main>'\n" +
-      "\t1: from -:5:in `bar'\n" +
-      "-:2:in `foo': \e[1mfoo! (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" +
-      "\t2: from -:9:in `<main>'\n" +
-      "\t1: from -:4:in `bar'\n" +
-      "-:7:in `rescue in bar': \e[1mbar! (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n"
-    assert_pty([], <<-"end;", [], err)
-    def foo
-      raise "foo!"
-    end
     def bar
       foo
     rescue

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

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