summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Robert <damien.olivier.robert+git@gmail.com>2018-10-03 22:43:36 +0200
committerDamien Robert <damien.olivier.robert+git@gmail.com>2018-10-03 22:43:36 +0200
commit80decc7c57675befe87566b8195cee4b88e265b2 (patch)
treeb971a28a4bb1b2f65e9a13cecb86085ff8287105
parent05ac4fc5e50a4ce1a76c4a8af9addc9acfde8302 (diff)
downloadpry-80decc7c57675befe87566b8195cee4b88e265b2.tar.gz
pry_repl_spec: test for previous overhang fix
-rw-r--r--spec/pry_repl_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/pry_repl_spec.rb b/spec/pry_repl_spec.rb
index 44be85d1..b7b3cff6 100644
--- a/spec/pry_repl_spec.rb
+++ b/spec/pry_repl_spec.rb
@@ -121,4 +121,19 @@ describe Pry::REPL do
$stdout = old_stdout
end
end
+
+ describe "autoindent" do
+ it "should raise no exception when indented with a tab" do
+ ReplTester.start(correct_indent: true, auto_indent: true) do
+ output=@pry.config.output
+ def output.tty?; true; end
+ input <<EOS
+loop do
+ break #note the tab here
+end
+EOS
+ output("do\n break #note the tab here\nend\n\e[1B\e[0G=> nil")
+ end
+ end
+ end
end