Add spec to demonstrate bracketed-paste-magic bug workaround

Add `bracketed-paste` to list of widgets that clear the suggestion as a
workaround for GitHub #351
This commit is contained in:
Eric Freese 2019-04-15 12:47:21 -06:00
parent e7c7efe2e2
commit ce6ee94f30

View file

@ -24,4 +24,20 @@ describe 'pasting using bracketed-paste-magic' do
end end
end end
end end
context 'with `bracketed-paste` added to the list of widgets that clear the suggestion' do
let(:options) { ['ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)'] }
it 'does not retain an old suggestion' do
with_history ('echo foo') do
session.send_string('echo ')
wait_for { session.content }.to eq('echo foo')
session.paste_string('bar')
wait_for { session.content }.to eq('echo bar')
session.send_keys('C-a') # Any cursor movement works
sleep 1
expect(session.content).to eq('echo bar')
end
end
end
end end