aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/reline/config.rb1
-rw-r--r--test/reline/test_config.rb22
2 files changed, 13 insertions, 10 deletions
diff --git a/lib/reline/config.rb b/lib/reline/config.rb
index b5ed6a89ba..6330f777d3 100644
--- a/lib/reline/config.rb
+++ b/lib/reline/config.rb
@@ -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
diff --git a/test/reline/test_config.rb b/test/reline/test_config.rb
index 1e65c885d0..bb9bb30a36 100644
--- a/test/reline/test_config.rb
+++ b/test/reline/test_config.rb
@@ -103,16 +103,18 @@ class Reline::Config::Test < Reline::TestCase
end
def test_if_with_indent
- @config.read_lines(<<~LINES.split(/(?<=\n)/))
- set bell-style none
- $if Ruby
- set bell-style audible
- $else
- set bell-style visible
- $endif
- LINES
-
- assert_equal :audible, @config.instance_variable_get(:@bell_style)
+ %w[Ruby Reline].each do |cond|
+ @config.read_lines(<<~LINES.split(/(?<=\n)/))
+ set bell-style none
+ $if #{cond}
+ set bell-style audible
+ $else
+ set bell-style visible
+ $endif
+ LINES
+
+ assert_equal :audible, @config.instance_variable_get(:@bell_style)
+ end
end
def test_default_key_bindings