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

ruby-changes:55437

From: aycabta <ko1@a...>
Date: Sat, 20 Apr 2019 18:32:50 +0900 (JST)
Subject: [ruby-changes:55437] aycabta:r67649: Remove IRB's old test files

aycabta	2019-04-20 18:32:44 +0900 (Sat, 20 Apr 2019)

  New Revision: 67649

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

  Log:
    Remove IRB's old test files

  Removed files:
    trunk/test/irb/test_completion.rb
    trunk/test/irb/test_ruby-lex.rb
Index: test/irb/test_completion.rb
===================================================================
--- test/irb/test_completion.rb	(revision 67648)
+++ test/irb/test_completion.rb	(nonexistent)
@@ -1,22 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/test/irb/test_completion.rb#L0
-# frozen_string_literal: false
-require 'test/unit'
-
-module TestIRB
-  class TestCompletion < Test::Unit::TestCase
-    def test_nonstring_module_name
-      begin
-        require "irb/completion"
-        bug5938 = '[ruby-core:42244]'
-        cmds = %W[-rirb -rirb/completion -e IRB.setup(__FILE__)
-         -e IRB.conf[:MAIN_CONTEXT]=IRB::Irb.new.context
-         -e module\sFoo;def\sself.name;//;end;end
-         -e IRB::InputCompletor::CompletionProc.call("[1].first.")
-         -- -f --]
-        status = assert_in_out_err(cmds, "", //, [], bug5938)
-        assert(status.success?, bug5938)
-      rescue LoadError
-        skip "cannot load irb/completion"
-      end
-    end
-  end
-end

Property changes on: test/irb/test_completion.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: test/irb/test_ruby-lex.rb
===================================================================
--- test/irb/test_ruby-lex.rb	(revision 67648)
+++ test/irb/test_ruby-lex.rb	(nonexistent)
@@ -1,108 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby-lex.rb#L0
-# frozen_string_literal: false
-require 'test/unit'
-require 'irb/ruby-lex'
-require 'stringio'
-
-module TestIRB
-  class TestRubyLex < Test::Unit::TestCase
-    def setup
-      @scanner = RubyLex.new
-    end
-
-    def teardown
-      RubyLex.debug_level = 0
-    end
-
-    def test_set_input_proc
-      called = false
-      @scanner.set_input(nil) {called = true; nil}
-      @scanner.each_top_level_statement {}
-      assert(called)
-    end
-
-    def test_comment
-      assert_equal([["#\n", 1]], top_level_statement("#\n"))
-    end
-
-    def test_top_level_statement
-      result = top_level_statement("#{<<-"begin;"}#{<<~"end;"}")
-      begin;
-        begin
-        end
-        begin
-        end
-      end;
-      assert_equal([
-                     ["begin\n""end\n", 1],
-                     ["begin\n""end\n", 3],
-                   ],
-                   result)
-    end
-
-    def test_immature_statement
-      src = "if false\n"
-      assert_equal([[src, 1]], top_level_statement(src))
-    end
-
-    def test_prompt
-      prompts = []
-      @scanner.set_prompt {|*a|
-        a << @scanner.instance_variable_get(:@lex_state)
-        unless prompts.last == a
-          prompts << a
-        end
-      }
-      src, lineno = "#{<<-"begin;"}#{<<~'end;'}", __LINE__+1
-      begin;
-        #            #;# LTYPE:INDENT:CONTINUE
-        x            #;# -:0:-
-        x(           #;# -:0:-
-        )            #;# -:1:*
-        a \          #;# -:0:-
-                     #;# -:0:*
-        a;           #;# -:0:-
-        a            #;# -:0:-
-                     #;# -:0:-
-        a            #;# -:0:-
-        a =          #;# -:0:-
-          '          #;# -:0:*
-          '          #;# ':0:*
-        if false or  #;# -:0:-
-          true       #;# -:1:*
-          a          #;# -:1:-
-          "          #;# -:1:-
-          "          #;# ":1:-
-          begin      #;# -:1:-
-            a        #;# -:2:-
-            a        #;# -:2:-
-          end        #;# -:2:-
-        else         #;# -:1:-
-          nil        #;# -:1:-
-        end          #;# -:1:-
-      end;
-      top_level_statement(src.gsub(/[ \t]*#;#.*/, ''))
-      src.each_line.with_index(1) do |line, i|
-        p = prompts.shift
-        next unless /#;#\s*(?:-|(?<ltype>\S)):(?<indent>\d+):(?:(?<cont>\*)|-)(?:.*FIXME:(?<fixme>.*))?/ =~ line
-        indent = indent.to_i
-        cont = (fixme && /`continue'/.match?(fixme)) ^ cont
-        assert_equal([ltype, indent, cont, i], p[0..3], "#{lineno+i}:#{p[4]}: #{line}")
-      end
-    end
-
-    def top_level_statement(lines)
-      input = InputLines.new(lines, "r")
-      scanned = []
-      @scanner.set_input(input)
-      @scanner.each_top_level_statement {|*e|
-        scanned << e
-        yield(*e) if defined?(yield)
-      }
-      scanned
-    end
-
-    class InputLines < StringIO
-      alias encoding external_encoding
-    end
-  end
-end

Property changes on: test/irb/test_ruby-lex.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property

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

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