mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Rewrite with_history test helper to be more robust
Write mock history to a temp file and load it directly with `fc -R` instead of running each command individually to build up the history.
This commit is contained in:
parent
9ad039443f
commit
e715ffb1ae
2 changed files with 14 additions and 16 deletions
|
|
@ -1,11 +1,6 @@
|
|||
describe 'a multi-line suggestion' do
|
||||
it 'should be displayed on multiple lines' do
|
||||
with_history(-> {
|
||||
session.send_string('echo "')
|
||||
session.send_keys('enter')
|
||||
session.send_string('"')
|
||||
session.send_keys('enter')
|
||||
}) do
|
||||
with_history("echo \"\n\"") do
|
||||
session.send_keys('e')
|
||||
wait_for { session.content }.to eq("echo \"\n\"")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue