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

ruby-changes:45380

From: nobu <ko1@a...>
Date: Sun, 29 Jan 2017 18:52:01 +0900 (JST)
Subject: [ruby-changes:45380] nobu:r57453 (trunk): tests for irb lexer

nobu	2017-01-29 18:51:55 +0900 (Sun, 29 Jan 2017)

  New Revision: 57453

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

  Log:
    tests for irb lexer

  Added files:
    trunk/test/irb/test_ruby-lex.rb
Index: test/irb/test_ruby-lex.rb
===================================================================
--- test/irb/test_ruby-lex.rb	(revision 0)
+++ test/irb/test_ruby-lex.rb	(revision 57453)
@@ -0,0 +1,18 @@ https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby-lex.rb#L1
+# frozen_string_literal: false
+require 'test/unit'
+require 'irb/ruby-lex'
+
+module TestIRB
+  class TestRubyLex < Test::Unit::TestCase
+    def setup
+      @scanner = RubyLex.new
+    end
+
+    def test_set_input_proc
+      called = false
+      @scanner.set_input(self) {|x| called = true; nil}
+      assert_nil(@scanner.lex)
+      assert(called)
+    end
+  end
+end

Property changes on: test/irb/test_ruby-lex.rb
___________________________________________________________________
Added: svn:eol-style
   + LF


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

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