Mercurial > dotfiles
comparison .zfun/zsh-autosuggestions/spec/integrations/zle_input_stack_spec.rb @ 467:e1ce8897030d
zsh: import df6f6f9ff41 of zsh-autosuggestions
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 03 Dec 2018 22:37:29 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
466:f248cf012d9a | 467:e1ce8897030d |
---|---|
1 describe 'using `zle -U`' do | |
2 let(:before_sourcing) do | |
3 -> do | |
4 session. | |
5 run_command('_zsh_autosuggest_strategy_test() { sleep 1; _zsh_autosuggest_strategy_history "$1" }'). | |
6 run_command('foo() { zle -U - "echo hello" }; zle -N foo; bindkey ^B foo') | |
7 end | |
8 end | |
9 | |
10 let(:options) { ['unset ZSH_AUTOSUGGEST_USE_ASYNC', 'ZSH_AUTOSUGGEST_STRATEGY=test'] } | |
11 | |
12 # TODO: This is only possible with the $KEYS_QUEUED_COUNT widget parameter, coming soon... | |
13 xit 'does not fetch a suggestion for every inserted character' do | |
14 session.send_keys('C-b') | |
15 wait_for { session.content }.to eq('echo hello') | |
16 end | |
17 | |
18 it 'shows a suggestion when the widget completes' do | |
19 with_history('echo hello world') do | |
20 session.send_keys('C-b') | |
21 wait_for { session.content(esc_seqs: true) }.to match(/\Aecho hello\e\[[0-9]+m world/) | |
22 end | |
23 end | |
24 end |