From 52cf5af91c523ae2955f3272d51a80ede6e0ad33 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 10 Jul 2016 15:44:44 +0900 Subject: [PATCH] [test] Fix test failure on Travis CI No guarantee in the order in which files are listed --- test/test_go.rb | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/test/test_go.rb b/test/test_go.rb index b2c52c1..d66d39f 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1323,8 +1323,20 @@ module TestShell tmux.until(1) { |lines| lines.item_count >= 1 } tmux.send_keys 'fzf-unicode', pane: 1 tmux.until(1) { |lines| lines[-2].start_with? ' 2/' } - tmux.send_keys :BTab, :BTab, pane: 1 + + tmux.send_keys '1', pane: 1 + tmux.until(1) { |lines| lines[-2].start_with? ' 1/' } + tmux.send_keys :BTab, pane: 1 + tmux.until(1) { |lines| lines[-2].include? '(1)' } + + tmux.send_keys :BSpace, pane: 1 + tmux.until(1) { |lines| lines[-2].start_with? ' 2/' } + + tmux.send_keys '2', pane: 1 + tmux.until(1) { |lines| lines[-2].start_with? ' 1/' } + tmux.send_keys :BTab, pane: 1 tmux.until(1) { |lines| lines[-2].include? '(2)' } + tmux.send_keys :Enter, pane: 1 tmux.until { |lines| lines[-1].include?('cat') || lines[-2].include?('cat') } tmux.until { |lines| lines[-1].include?('fzf-unicode') || lines[-2].include?('fzf-unicode') } @@ -1539,8 +1551,20 @@ module CompletionTest tmux.prepare tmux.send_keys 'cat fzf-unicode**', :Tab, pane: 0 tmux.until(1) { |lines| lines[-2].start_with? ' 2/' } - tmux.send_keys :BTab, :BTab, pane: 1 + + tmux.send_keys '1', pane: 1 + tmux.until(1) { |lines| lines[-2].start_with? ' 1/' } + tmux.send_keys :BTab, pane: 1 + tmux.until(1) { |lines| lines[-2].include? '(1)' } + + tmux.send_keys :BSpace, pane: 1 + tmux.until(1) { |lines| lines[-2].start_with? ' 2/' } + + tmux.send_keys '2', pane: 1 + tmux.until(1) { |lines| lines[-2].start_with? ' 1/' } + tmux.send_keys :BTab, pane: 1 tmux.until(1) { |lines| lines[-2].include? '(2)' } + tmux.send_keys :Enter, pane: 1 tmux.until { |lines| lines[-1].include?('cat') || lines[-2].include?('cat') } tmux.send_keys :Enter