mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
added regression test for weird string interpolation bug
This commit is contained in:
parent
1fad5ec28e
commit
0b184fec79
1 changed files with 9 additions and 0 deletions
|
@ -487,6 +487,15 @@ describe Pry do
|
|||
$test_interpolation = nil
|
||||
end
|
||||
|
||||
# bug fix for https://github.com/banister/pry/issues/170
|
||||
it 'should not choke on complex string interpolation when checking if ruby code is a command' do
|
||||
redirect_pry_io(InputTester.new('/#{Regexp.escape(File.expand_path("."))}/'), str_output = StringIO.new) do
|
||||
pry
|
||||
end
|
||||
|
||||
str_output.string.should.not =~ /SyntaxError/
|
||||
end
|
||||
|
||||
it 'should NOT interpolate ruby code into commands if :interpolate => false' do
|
||||
klass = Pry::CommandSet.new do
|
||||
command "hello", "", :keep_retval => true, :interpolate => false do |arg|
|
||||
|
|
Loading…
Add table
Reference in a new issue