1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

31 commits

Author SHA1 Message Date
Kyrylo Silin
8f3e4555ba Tidy up tests and remove some repeating code
Clean up repeating code on the subject of str_output variable. Fix
indentation in some files and restructure some tests, in order to
ease parsing of files by an eye.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
2012-06-11 19:33:04 +02:00
Gerbert Olivé
645821e4d8 Apply hist --tail or --head after --grep 2012-02-10 22:53:12 +01:00
John Mair
a18d90b9e8 hist --replay now uses eval_string <<, fixes #443
This ensures that the replayed lines end up in the pry input cache. This behaviour is now inline with the way play works.
2012-01-24 22:57:50 +13:00
John Mair
63ac93a18d added more tests for show-doc and play 2012-01-24 02:19:26 +13:00
John Mair
7c8aa38015 removed some unnecessary global vars from tests 2012-01-24 01:09:51 +13:00
Conrad Irwin
e26ad59c12 Remove off-by-one in history [Fixes #368]
Remove unnecessary stubbing of history in tests that hid the problem.
2012-01-17 23:11:33 -08:00
John Mair
c02772af19 added basic skeleton for hooks system (yet to add many hook callsites) 2011-11-13 02:37:57 +13:00
Ryan Fitzgerald
ccb215c26b add hist --no-numbers and refactor hist (fixes #243) 2011-09-12 21:09:15 -07:00
Conrad Irwin
0aa26bb06a Fix escapement 2011-09-12 00:56:34 -07:00
John Mair
d5182d8abd play -m should append to eval_string, not replace it. 2011-09-12 19:38:46 +12:00
John Mair
0200f1b6f4 play -m now uses eval_string.replace() instead of changing Pry#input
This is simpler and more transparent. Also added to this commit is `show-input` now invoked immediately after a `play -m meth --open` (this was only possible because of the eval_string change).
Tests for `play` method also updated to reflect changes.
2011-09-12 04:26:38 +12:00
Ryan Fitzgerald
9252e6ce78 improve regex for amend-line command
* accurate spacing in front of the replacement line when there's no line number
* remove legacy "amend-line-N" syntax
2011-09-07 22:17:01 -07:00
John Mair
25e8a27284 when playing string vars using the play command can now use --lines, note only able to play string variables now - not just arbitrary strings. Primary use is with _in_ special local 2011-09-06 23:55:41 +12:00
Ryan Fitzgerald
a1a7cdc03d Pry.input_history -> Pry.history, Pry::InputHistory -> Pry::History 2011-09-05 01:56:28 -07:00
Ryan Fitzgerald
226f1ae816 replace direct Readline interface with InputHistory 2011-09-05 01:56:28 -07:00
John Mair
87a9bb06e4 tried to adapt some tests in test_input related to history to work around libedit bug in ruby 1.8.7 (still two failing tests) 2011-08-13 12:46:20 +12:00
Conrad Irwin
43b261c2e1 Omit blank and repeated lines from Readline::HISTORY.
We still preserve them in the line count and the line_buffer though,
lest we muchly confuse show-method and its ilk
2011-08-13 12:46:18 +12:00
Conrad Irwin
13bedefc26 Exclude the current line from History. 2011-07-24 16:20:32 -07:00
John Mair
82f348ac04 added tests for intrrospection and input commands to work with unified one-indexing (show-input, amend-line, play, etc) 2011-06-17 01:51:32 +12:00
John Mair
52611848d8 added yet more tests for amend-line, this time for insert behaviour 2011-06-16 01:45:28 +12:00
John Mair
2db8133166 fixed failing test on 1.8.7 2011-06-14 02:03:10 +12:00
Rob Gleeson
2b521f0a34 Merge branch 'master' of github.com:banister/pry 2011-06-13 14:29:42 +01:00
John Mair
0b4c186cc9 added tests for negative line number support in amend-line 2011-06-14 00:54:58 +12:00
John Mair
6b1b680c06 added more tests for amend-line relating to deletion of lines using bang, also testing error messages when nothing to amend 2011-06-14 00:54:57 +12:00
John Mair
d79d452494 added tests for play command 2011-06-13 01:07:42 +12:00
John Mair
b622b9dead added tests for new amend-line behaviour 2011-06-12 18:14:54 +12:00
Rob Gleeson
c63015916d We can't use negative ranges because Slop interprets -1 as a switch. 2011-06-11 12:42:54 +01:00
John Mair
ed04bc7924 fixed test_input.rb tests, for amend-line 2011-06-11 02:15:42 +12:00
John Mair
64b027c07d added test for amend-line that ensures interpolated strings are allowed 2011-06-11 02:15:41 +12:00
John Mair
9a245adb04 added tests for show-input and \! commands 2011-06-03 21:55:23 +12:00
John Mair
597f1cc68c reorganized command tests into test_default_commands/ folder with separate test files for each command set 2011-06-03 03:26:49 +12:00