[ruby-cvs:79028] a118bb805f (master): [ruby/irb] Add tests for RubyLex

"Ben" <[email protected]> Tue, 31 Dec 2019 23:32:41 +0900 (JST)
Newsgroups gmane.comp.lang.ruby.cvs
Message-ID <[email protected]>
Ben	2019-12-28 03:17:02 +0900 (Sat, 28 Dec 2019)

  New Revision: a118bb805f

  https://github.com/ruby/ruby/commit/a118bb805f

  Log:
    [ruby/irb] Add tests for RubyLex
    
    The set_auto_indent method calculates the correct number of spaces for
    indenting a line. We think there might be a few bugs in this method so
    we are testing the current functionality to make sure nothing breaks
    when we address those bugs.
    
    Example test failure:
    
    ```
      1) Failure:
    TestIRB::TestRubyLex#test_auto_indent [/Users/Ben/Projects/irb/test/irb/test_ruby_lex.rb:75]:
    Calculated the wrong number of spaces for:
     def each_top_level_statement
      initialize_input
      catch(:TERM_INPUT) do
        loop do
          begin
            prompt
            unless l = lex
              throw :TERM_INPUT if @line == ''
            else
    .
    <10> expected but was
    <12>.
    ```
    
    https://github.com/ruby/irb/commit/752d5597ab

  Added files:
    test/irb/test_ruby_lex.rb