Skip to content

Commit f842532

Browse files
lieryanjonathanslenders
authored andcommitted
Add test for repeating substitution pattern from substitute history
1 parent 9d15fbc commit f842532

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_substitute.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ def test_substitute_from_search_history(editor, editor_buffer):
6767
assert 'Violets are pretty,' in editor_buffer.buffer.text
6868

6969

70+
def test_substitute_from_substitute_search_history(editor, editor_buffer):
71+
given_sample_text(editor_buffer, 'Violet is Violet')
72+
73+
handle_command(editor, ':s/Violet/Rose')
74+
assert 'Rose is Violet' in editor_buffer.buffer.text
75+
76+
handle_command(editor, ':s//Lily')
77+
assert 'Rose is Lily' in editor_buffer.buffer.text
78+
79+
7080
def test_substitute_with_repeat_last_substitution(editor, editor_buffer):
7181
given_sample_text(editor_buffer, 'Violet is Violet\n')
7282
editor.application.current_search_state.text = 'Lily'

0 commit comments

Comments
 (0)