comparison .zfun/zsh-autosuggestions/spec/widgets/fetch_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 'the `autosuggest-fetch` widget' do
2 context 'when suggestions are disabled' do
3 before do
4 session.
5 run_command('bindkey ^B autosuggest-disable').
6 run_command('bindkey ^F autosuggest-fetch').
7 send_keys('C-b')
8 end
9
10 it 'will fetch and display a suggestion' do
11 with_history('echo hello') do
12 session.send_string('echo h')
13 sleep 1
14 expect(session.content).to eq('echo h')
15
16 session.send_keys('C-f')
17 wait_for { session.content }.to eq('echo hello')
18
19 session.send_string('e')
20 wait_for { session.content }.to eq('echo hello')
21 end
22 end
23 end
24 end