mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add true condition Reline
This commit is contained in:
parent
06a25344d9
commit
d04ebc57f2
2 changed files with 12 additions and 9 deletions
|
@ -143,6 +143,7 @@ class Reline::Config
|
|||
when 'version'
|
||||
else # application name
|
||||
condition = true if args == 'Ruby'
|
||||
condition = true if args == 'Reline'
|
||||
end
|
||||
unless @skip_section.nil?
|
||||
@if_stack << @skip_section
|
||||
|
|
|
@ -103,9 +103,10 @@ class Reline::Config::Test < Reline::TestCase
|
|||
end
|
||||
|
||||
def test_if_with_indent
|
||||
%w[Ruby Reline].each do |cond|
|
||||
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
||||
set bell-style none
|
||||
$if Ruby
|
||||
$if #{cond}
|
||||
set bell-style audible
|
||||
$else
|
||||
set bell-style visible
|
||||
|
@ -114,6 +115,7 @@ class Reline::Config::Test < Reline::TestCase
|
|||
|
||||
assert_equal :audible, @config.instance_variable_get(:@bell_style)
|
||||
end
|
||||
end
|
||||
|
||||
def test_default_key_bindings
|
||||
@config.add_default_key_binding('abcd'.bytes, 'EFGH'.bytes)
|
||||
|
|
Loading…
Reference in a new issue