2017-02-16 19:18:03 -07:00
|
|
|
describe 'a running zpty command' do
|
2017-02-17 15:51:50 -07:00
|
|
|
let(:before_sourcing) { -> { session.run_command('zmodload zsh/zpty && zpty -b kitty cat') } }
|
|
|
|
|
2018-05-22 17:16:45 -06:00
|
|
|
context 'when sourcing the plugin' do
|
|
|
|
it 'is not affected' do
|
|
|
|
sleep 1 # Give a little time for precmd hooks to run
|
|
|
|
session.run_command('zpty -t kitty; echo $?')
|
2017-02-16 19:18:03 -07:00
|
|
|
|
2018-05-22 17:16:45 -06:00
|
|
|
wait_for { session.content }.to end_with("\n0")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when using `completion` strategy' do
|
|
|
|
let(:options) { ["ZSH_AUTOSUGGEST_STRATEGY=completion"] }
|
|
|
|
|
|
|
|
it 'is not affected' do
|
|
|
|
session.send_keys('a').send_keys('C-h')
|
|
|
|
session.run_command('zpty -t kitty; echo $?')
|
|
|
|
|
|
|
|
wait_for { session.content }.to end_with("\n0")
|
|
|
|
end
|
2017-02-16 19:18:03 -07:00
|
|
|
end
|
|
|
|
end
|