Use += to be a bit more true to the spec language

This commit is contained in:
Eric Freese 2017-02-18 10:35:30 -07:00
parent 4321fc097c
commit 255359dbb8

View file

@ -2,7 +2,7 @@ describe 'a zle widget' do
let(:before_sourcing) { -> { session.run_command('my-widget() {}; zle -N my-widget; bindkey ^B my-widget') } } let(:before_sourcing) { -> { session.run_command('my-widget() {}; zle -N my-widget; bindkey ^B my-widget') } }
context 'when added to ZSH_AUTOSUGGEST_ACCEPT_WIDGETS' do context 'when added to ZSH_AUTOSUGGEST_ACCEPT_WIDGETS' do
let(:options) { ['ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(my-widget)'] } let(:options) { ['ZSH_AUTOSUGGEST_ACCEPT_WIDGETS+=(my-widget)'] }
it 'accepts the suggestion when invoked' do it 'accepts the suggestion when invoked' do
with_history('echo hello') do with_history('echo hello') do
@ -15,7 +15,7 @@ describe 'a zle widget' do
end end
context 'when added to ZSH_AUTOSUGGEST_CLEAR_WIDGETS' do context 'when added to ZSH_AUTOSUGGEST_CLEAR_WIDGETS' do
let(:options) { ['ZSH_AUTOSUGGEST_CLEAR_WIDGETS=(my-widget)'] } let(:options) { ['ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(my-widget)'] }
it 'clears the suggestion when invoked' do it 'clears the suggestion when invoked' do
with_history('echo hello') do with_history('echo hello') do
@ -28,7 +28,7 @@ describe 'a zle widget' do
end end
context 'when added to ZSH_AUTOSUGGEST_EXECUTE_WIDGETS' do context 'when added to ZSH_AUTOSUGGEST_EXECUTE_WIDGETS' do
let(:options) { ['ZSH_AUTOSUGGEST_EXECUTE_WIDGETS=(my-widget)'] } let(:options) { ['ZSH_AUTOSUGGEST_EXECUTE_WIDGETS+=(my-widget)'] }
it 'executes the suggestion when invoked' do it 'executes the suggestion when invoked' do
with_history('echo hello') do with_history('echo hello') do