Skip to content
Myr

Minor tweak in test case

Before adoption: this commit came in with the history the project adopted, so no landing records it.

It may take long for find command to spot the temporary file created on the home directory

authored by Junegunn Choi · committed by Junegunn Choi · parent 40761b1 · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • tests:+5 added−5 removed

1 file+5 added−5 removed

modified:test/test_go.rb+5 added-5 removed
583 unmodified lines
584 def test_file_completion585 FileUtils.mkdir_p '/tmp/fzf-test'586 FileUtils.mkdir_p '/tmp/fzf test'587 (1..100).each { |i| FileUtils.touch "/tmp/fzf-test/#{i}" }588 ['no~such~user', '/tmp/fzf test/foobar', '~/fzf-home'].each do |f|588 ['no~such~user', '/tmp/fzf test/foobar', '~/.fzf-home'].each do |f|589 FileUtils.touch File.expand_path(f)590 end591 tmux.prepare592 tmux.send_keys 'cat /tmp/fzf-test/10**', :Tab, pane: 0
8 unmodified lines
601 # ~USERNAME**<TAB>602 tmux.send_keys 'C-u'603 tmux.send_keys "cat ~#{ENV['USER']}**", :Tab, pane: 0604 tmux.until(1) { |lines| lines.item_count > 0 }605 tmux.send_keys 'fzf-home'606 tmux.until(1) { |lines| lines[-3].end_with? 'fzf-home' }605 tmux.send_keys '.fzf-home'606 tmux.until(1) { |lines| lines[-3].end_with? '.fzf-home' }607 tmux.send_keys :Enter608 tmux.until do |lines|609 tmux.send_keys 'C-L'610 lines[-1].end_with?('fzf-home')610 lines[-1].end_with?('.fzf-home')611 end612613 # ~INVALID_USERNAME**<TAB>614 tmux.send_keys 'C-u'
14 unmodified lines
629 tmux.send_keys 'C-L'630 lines[-1].end_with?('/tmp/fzf\ test/foobar')631 end632 ensure633 ['/tmp/fzf-test', '/tmp/fzf test', '~/fzf-home', 'no~such~user'].each do |f|633 ['/tmp/fzf-test', '/tmp/fzf test', '~/.fzf-home', 'no~such~user'].each do |f|634 FileUtils.rm_rf File.expand_path(f)635 end636 end637
93 unmodified lines