comparison .zfun/zsh-autosuggestions/spec/widgets/toggle_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-toggle` widget' do
2 before do
3 session.run_command('bindkey ^B autosuggest-toggle')
4 end
5
6 it 'toggles suggestions' do
7 with_history('echo world', 'echo hello') do
8 session.send_string('echo')
9 wait_for { session.content }.to eq('echo hello')
10
11 session.send_keys('C-b')
12 wait_for { session.content }.to eq('echo')
13
14 session.send_string(' h')
15 sleep 1
16 expect(session.content).to eq('echo h')
17
18 session.send_keys('C-b')
19 wait_for { session.content }.to eq('echo hello')
20
21 session.send_keys('C-h')
22 session.send_string('w')
23 wait_for { session.content }.to eq('echo world')
24 end
25 end
26 end