diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-29 09:51:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-29 09:51:55 +0000 |
commit | 327912fc7f4da3a3cabac7414455617f66f02b5c (patch) | |
tree | d223cb3747179b0fe845cc1e602a017bf46b293c /test/irb | |
parent | 590815c006d23c36eab3b8122185c037d28564b6 (diff) | |
download | ruby-327912fc7f4da3a3cabac7414455617f66f02b5c.tar.gz |
tests for irb lexer
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/irb')
-rw-r--r-- | test/irb/test_ruby-lex.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/irb/test_ruby-lex.rb b/test/irb/test_ruby-lex.rb new file mode 100644 index 0000000000..f7d331bc24 --- /dev/null +++ b/test/irb/test_ruby-lex.rb @@ -0,0 +1,18 @@ +# 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 |