mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
tests for irb lexer
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
afe4e0e4d6
commit
25ad4a7907
1 changed files with 18 additions and 0 deletions
18
test/irb/test_ruby-lex.rb
Normal file
18
test/irb/test_ruby-lex.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue