From 61312cc88530fc2dc1db0432f2c6680bb7acd6e3 Mon Sep 17 00:00:00 2001 From: Aaron Culich Date: Sun, 14 Jul 2024 13:18:04 -0700 Subject: [PATCH] add yank-pop test based on suggestion in PR #551 --- spec/yank_pop_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 spec/yank_pop_spec.rb diff --git a/spec/yank_pop_spec.rb b/spec/yank_pop_spec.rb new file mode 100644 index 0000000..7098368 --- /dev/null +++ b/spec/yank_pop_spec.rb @@ -0,0 +1,18 @@ +context 'after positioning cursor before a word' do + before do + session.send_string('echo hello world bye') + end + + describe '`yank` then `yank-pop`' do + it 'should insert text in correct position before word' do + session.send_keys('C-w').send_keys('C-h').send_keys('C-w') + wait_for { session.content }.to eq('echo hello') + + session.send_keys('M-b').send_keys('C-y') + wait_for { session.content }.to eq('echo worldhello') + + session.send_keys('M-y') + wait_for { session.content }.to eq('echo byehello') + end + end +end