@@ -142,48 +142,62 @@ def test_base_history(base_app):
142142""" )
143143 assert out == expected
144144
145-
146- def test_base_list (base_app ):
145+ def test_history_with_string_argument (base_app ):
147146 run_cmd (base_app , 'help' )
148147 run_cmd (base_app , 'shortcuts' )
149- out = run_cmd (base_app , 'list' )
148+ run_cmd (base_app , 'help history' )
149+ out = run_cmd (base_app , 'history help' )
150150 expected = normalize ("""
151- -------------------------[2]
152- shortcuts
151+ -------------------------[1]
152+ help
153+ -------------------------[3]
154+ help history
153155""" )
154156 assert out == expected
155157
156158
157- def test_list_with_string_argument (base_app ):
159+ def test_history_with_integer_argument (base_app ):
158160 run_cmd (base_app , 'help' )
159161 run_cmd (base_app , 'shortcuts' )
160- run_cmd (base_app , 'help list' )
161- out = run_cmd (base_app , 'list help' )
162+ out = run_cmd (base_app , 'history 1' )
162163 expected = normalize ("""
163164-------------------------[1]
164165help
165- -------------------------[3]
166- help list
167166""" )
168167 assert out == expected
169168
170169
171- def test_list_with_integer_argument (base_app ):
170+ def test_history_with_integer_span (base_app ):
172171 run_cmd (base_app , 'help' )
173172 run_cmd (base_app , 'shortcuts' )
174- out = run_cmd (base_app , 'list 1' )
173+ run_cmd (base_app , 'help history' )
174+ out = run_cmd (base_app , 'history 1..2' )
175175 expected = normalize ("""
176176-------------------------[1]
177177help
178+ -------------------------[2]
179+ shortcuts
178180""" )
179181 assert out == expected
180182
183+ def test_history_with_span_start (base_app ):
184+ run_cmd (base_app , 'help' )
185+ run_cmd (base_app , 'shortcuts' )
186+ run_cmd (base_app , 'help history' )
187+ out = run_cmd (base_app , 'history 2:' )
188+ expected = normalize ("""
189+ -------------------------[2]
190+ shortcuts
191+ -------------------------[3]
192+ help history
193+ """ )
194+ assert out == expected
181195
182- def test_list_with_integer_span (base_app ):
196+ def test_history_with_span_end (base_app ):
183197 run_cmd (base_app , 'help' )
184198 run_cmd (base_app , 'shortcuts' )
185- run_cmd (base_app , 'help list ' )
186- out = run_cmd (base_app , 'list 1.. 2' )
199+ run_cmd (base_app , 'help history ' )
200+ out = run_cmd (base_app , 'history : 2' )
187201 expected = normalize ("""
188202-------------------------[1]
189203help
@@ -201,17 +215,13 @@ def test_base_cmdenvironment(base_app):
201215 Commands may be terminated with: [';']
202216 Command-line arguments allowed: True
203217 Output redirection and pipes allowed: True
218+ Parsing of @options commands:
219+ Use POSIX-style argument parser (vs Windows): False
220+ Strip Quotes when using Windows-style argument parser: True
221+ Use a list of arguments instead of a single argument string: False
222+
204223""" )
205- assert out [:4 ] == expected [:4 ]
206- assert out [4 ].strip ().startswith ('Settable parameters: ' )
207-
208- # Settable parameters can be listed in any order, so need to validate carefully using unordered sets
209- settable_params = {'continuation_prompt' , 'default_file_name' , 'prompt' , 'abbrev' , 'quiet' , 'case_insensitive' ,
210- 'colors' , 'echo' , 'timing' , 'editor' , 'feedback_to_output' , 'debug' , 'autorun_on_edit' ,
211- 'locals_in_py' }
212- out_params = set (out [4 ].split ("Settable parameters: " )[1 ].split ())
213- assert settable_params == out_params
214-
224+ assert out == expected
215225
216226def test_base_load (base_app , request ):
217227 test_dir = os .path .dirname (request .module .__file__ )
0 commit comments