Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements two of the skipped unit tests #762

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions spec/integrations/zle_input_stack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@

let(:options) { ['unset ZSH_AUTOSUGGEST_USE_ASYNC', 'ZSH_AUTOSUGGEST_STRATEGY=test'] }

# TODO: This is only possible with the $KEYS_QUEUED_COUNT widget parameter, coming soon...
xit 'does not fetch a suggestion for every inserted character' do
# This is only possible with the $KEYS_QUEUED_COUNT widget parameter
it 'does not fetch a suggestion for every inserted character' do
session.send_keys('C-b')
wait_for { session.content }.to eq('echo hello')

# Check if zsh >= 5.4
version_arr = ENV['TEST_ZSH_BIN'].split('zsh-')[1].split('.')
if version_arr[0].to_i >= 6 || (version_arr[0].to_i == 5 && version_arr[1].to_i >= 4)
wait_for { session.content }.to eq('echo hello')
else
skip "depends on KEYS_QUEUED_COUNT which requires zsh 5.4 or above"
end
end

it 'shows a suggestion when the widget completes' do
Expand Down
6 changes: 5 additions & 1 deletion spec/options/buffer_max_size_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
wait_for { session.content }.to eq(long_command)
end

it 'is not provided when the buffer is longer than the specified length'
it 'is not provided when the buffer is longer than the specified length' do
session.send_string(long_command[0...(buffer_max_size + 1)])
sleep 1
expect(session.content).to eq(long_command[0...(buffer_max_size + 1)])
end
end
end