1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Add yamatanooroti test for symbol with backtick

https://github.com/ruby/irb/commit/4d32f0e88e
This commit is contained in:
aycabta 2021-09-08 22:22:58 +09:00 committed by git
parent f085a6fb69
commit d86c1a3161

View file

@ -153,6 +153,23 @@ begin
EOC
end
def test_symbol_with_backtick
write_irbrc <<~'LINES'
puts 'start IRB'
LINES
start_terminal(40, 80, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb}, startup_message: 'start IRB')
write(<<~EOC)
:`
EOC
close
assert_screen(<<~EOC)
start IRB
irb(main):001:0> :`
=> :`
irb(main):002:0>
EOC
end
private def write_irbrc(content)
File.open(@irbrc_file, 'w') do |f|
f.write content