mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Lots of async changes
This commit is contained in:
parent
38eb7cdafd
commit
ed8056c5e8
35 changed files with 384 additions and 1133 deletions
20
spec/options/strategy_spec.rb
Normal file
20
spec/options/strategy_spec.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
describe 'a suggestion for a given prefix' do
|
||||
let(:options) { ['_zsh_autosuggest_strategy_default() { suggestion="echo foo" }'] }
|
||||
|
||||
it 'is determined by calling the default strategy function' do
|
||||
session.send_string('e')
|
||||
wait_for { session.content }.to eq('echo foo')
|
||||
end
|
||||
|
||||
context 'when ZSH_AUTOSUGGEST_STRATEGY is set' do
|
||||
let(:options) { [
|
||||
'_zsh_autosuggest_strategy_custom() { suggestion="echo foo" }',
|
||||
'ZSH_AUTOSUGGEST_STRATEGY=custom'
|
||||
] }
|
||||
|
||||
it 'is determined by calling the specified strategy function' do
|
||||
session.send_string('e')
|
||||
wait_for { session.content }.to eq('echo foo')
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue