diff options
author | aycabta <aycabta@gmail.com> | 2021-09-08 22:19:52 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-10 04:59:17 +0900 |
commit | f085a6fb6953a23e555cae7ffe4274927c6b0961 (patch) | |
tree | bd8bf3be2bad2655f8598020548a36a13f0e93f9 /test | |
parent | 419e6ed464b2abcc18b60d1bcbd183fe9dfb99c2 (diff) |
[ruby/irb] Support symbol with backtick
https://github.com/ruby/irb/commit/0aa2425883
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_ruby_lex.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index d31d38dc99..e255720e25 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -136,6 +136,26 @@ module TestIRB end end + def test_symbols + input_with_correct_indents = [ + Row.new(%q(:a), nil, 0), + Row.new(%q(:A), nil, 0), + Row.new(%q(:+), nil, 0), + Row.new(%q(:@@a), nil, 0), + Row.new(%q(:@a), nil, 0), + Row.new(%q(:$a), nil, 0), + Row.new(%q(:def), nil, 0), + Row.new(%q(:`), nil, 0), + ] + + lines = [] + input_with_correct_indents.each do |row| + lines << row.content + assert_indenting(lines, row.current_line_spaces, false) + assert_indenting(lines, row.new_line_spaces, true) + end + end + def test_endless_range_at_end_of_line if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0') pend 'Endless range is available in 2.6.0 or later' |