mirror of
				https://github.com/zsh-users/zsh-autosuggestions.git
				synced 2025-10-23 15:16:27 +08:00 
			
		
		
		
	Merge 52723c1dde into f8907cf32b
				
					
				
			This commit is contained in:
		
						commit
						6414ad96f4
					
				| @ -9,10 +9,17 @@ describe 'using `zle -U`' do | |||||||
| 
 | 
 | ||||||
|   let(:options) { ['unset ZSH_AUTOSUGGEST_USE_ASYNC', 'ZSH_AUTOSUGGEST_STRATEGY=test'] } |   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... |   # This is only possible with the $KEYS_QUEUED_COUNT widget parameter | ||||||
|   xit 'does not fetch a suggestion for every inserted character' do |   it 'does not fetch a suggestion for every inserted character' do | ||||||
|     session.send_keys('C-b') |     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 |   end | ||||||
| 
 | 
 | ||||||
|   it 'shows a suggestion when the widget completes' do |   it 'shows a suggestion when the widget completes' do | ||||||
|  | |||||||
| @ -25,6 +25,10 @@ describe 'a suggestion' do | |||||||
|       wait_for { session.content }.to eq(long_command) |       wait_for { session.content }.to eq(long_command) | ||||||
|     end |     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 | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 sb-o
						sb-o