1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/test
Yorick Peterse e2db26574f Pry::Indent now handles single line statements.
Previously certain lines of code would break the indentation process. For
example, the following code would result in incorrect indentation:

    def hello; end
    puts "Hello world"

This would result in the following:

    def hello; end
      puts "Hello world"

I've worked around this issue by adding a new method
(Pry::Indent#skip_indentation?) that does a lookahead on the list of tokens to
determine if a line should be indented or not. It's probably not the most
efficient way of doing it but it makes it quite easy to add more tokens to the
list without adding a lot more complexity.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
2011-10-08 15:32:49 +02:00
..
test_default_commands edit --in can take a range, added some more tests. 2011-09-26 00:45:49 -07:00
helper.rb fixed some style issues; renamed Pry.config.indent to Pry.config.auto_indent 2011-10-09 00:40:55 +13:00
test_command_helpers.rb update commands and tests to use Pry::Method 2011-09-22 01:20:32 -07:00
test_command_processor.rb remove interpolation of command names and fix interpolation error messages 2011-08-18 01:23:39 +12:00
test_command_set.rb add command_name to context 2011-09-24 23:52:07 -07:00
test_completion.rb updated tests for new _pry_ parameter being passed to before_session hook 2011-09-08 03:28:00 +12:00
test_default_commands.rb reorganized command tests into test_default_commands/ folder with separate test files for each command set 2011-06-03 03:26:49 +12:00
test_exception_whitelist.rb added basic tests for exception whitelist 2011-09-19 17:13:34 +12:00
test_history_array.rb Removed duplicate implementation from tests 2011-05-15 12:24:52 +02:00
test_indent.rb Pry::Indent now handles single line statements. 2011-10-08 15:32:49 +02:00
test_input_stack.rb Issue 284, Pry should respect input encoding. 2011-10-01 13:19:44 -07:00
test_method.rb update commands and tests to use Pry::Method 2011-09-22 01:20:32 -07:00
test_pry.rb removed warning test as warnings from bundler were causing test failure 2011-09-22 03:15:34 +12:00
test_pry_history.rb fixed tempfile-related bug and failing test and got rid of Pry.view() around nest_level in DEFAULT_PROMPT 2011-09-08 14:18:37 +12:00
test_pry_output.rb loosened test in test_pry_output.rb 2011-09-22 02:51:14 +12:00
test_special_locals.rb merged in robgleeson's patch to pass pry instance to prompts, also added test_special_local.rb and test_shell.rb tests 2011-09-02 22:25:18 +12:00
testrc version 0.6.8, added whereami command, made .pryrc run at the start of each runtime session, put syntax highlighting on by default 2011-03-06 03:17:54 +13:00