mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use simpler regexp
This commit is contained in:
parent
d04ebc57f2
commit
4fda39fc87
1 changed files with 6 additions and 6 deletions
|
@ -21,7 +21,7 @@ class Reline::Config::Test < Reline::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_read_lines
|
def test_read_lines
|
||||||
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
@config.read_lines(<<~LINES.split(/^/))
|
||||||
set bell-style on
|
set bell-style on
|
||||||
LINES
|
LINES
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class Reline::Config::Test < Reline::TestCase
|
||||||
set bell-style on
|
set bell-style on
|
||||||
PARTIAL_LINES
|
PARTIAL_LINES
|
||||||
end
|
end
|
||||||
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
@config.read_lines(<<~LINES.split(/^/))
|
||||||
$include included_partial
|
$include included_partial
|
||||||
LINES
|
LINES
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ class Reline::Config::Test < Reline::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_if
|
def test_if
|
||||||
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
@config.read_lines(<<~LINES.split(/^/))
|
||||||
$if Ruby
|
$if Ruby
|
||||||
set bell-style audible
|
set bell-style audible
|
||||||
$else
|
$else
|
||||||
|
@ -91,7 +91,7 @@ class Reline::Config::Test < Reline::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_if_with_false
|
def test_if_with_false
|
||||||
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
@config.read_lines(<<~LINES.split(/^/))
|
||||||
$if Python
|
$if Python
|
||||||
set bell-style audible
|
set bell-style audible
|
||||||
$else
|
$else
|
||||||
|
@ -104,7 +104,7 @@ class Reline::Config::Test < Reline::TestCase
|
||||||
|
|
||||||
def test_if_with_indent
|
def test_if_with_indent
|
||||||
%w[Ruby Reline].each do |cond|
|
%w[Ruby Reline].each do |cond|
|
||||||
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
@config.read_lines(<<~LINES.split(/^/))
|
||||||
set bell-style none
|
set bell-style none
|
||||||
$if #{cond}
|
$if #{cond}
|
||||||
set bell-style audible
|
set bell-style audible
|
||||||
|
@ -119,7 +119,7 @@ class Reline::Config::Test < Reline::TestCase
|
||||||
|
|
||||||
def test_default_key_bindings
|
def test_default_key_bindings
|
||||||
@config.add_default_key_binding('abcd'.bytes, 'EFGH'.bytes)
|
@config.add_default_key_binding('abcd'.bytes, 'EFGH'.bytes)
|
||||||
@config.read_lines(<<~'LINES'.split(/(?<=\n)/))
|
@config.read_lines(<<~'LINES'.split(/^/))
|
||||||
"abcd": "ABCD"
|
"abcd": "ABCD"
|
||||||
"ijkl": "IJKL"
|
"ijkl": "IJKL"
|
||||||
LINES
|
LINES
|
||||||
|
|
Loading…
Add table
Reference in a new issue