Skip to content
Myr

Fix test failure - use absolute path

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

authored by Junegunn Choi · committed by Junegunn Choi · parent e1df876 · Browse files · 1 file+9 added−8 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+9 added−8 removed

  • tests:+9 added−8 removed

1 file+9 added−8 removed

modified:test/test_go.rb+9 added-8 removed
4 unmodified lines
5require 'fileutils'67DEFAULT_TIMEOUT = 2089FILE = File.expand_path(__FILE__)10base = File.expand_path('../../', __FILE__)11Dir.chdir base12FZF = "FZF_DEFAULT_OPTS= FZF_DEFAULT_COMMAND= #{base}/bin/fzf"13
789 unmodified lines
803 assert_equal '6', readonce.chomp804 end805806 def test_header806 tmux.send_keys "seq 100 | #{fzf "--header \\\"\\$(head -5 #{__FILE__})\\\""}", :Enter807 header = File.readlines(__FILE__).take(5).map(&:strip)807 tmux.send_keys "seq 100 | #{fzf "--header \\\"\\$(head -5 #{FILE})\\\""}", :Enter808 header = File.readlines(FILE).take(5).map(&:strip)809 tmux.until do |lines|810 lines[-2].include?('100/100') &&811 lines[-7..-3].map(&:strip) == header812 end813 end814815 def test_header_reverse815 tmux.send_keys "seq 100 | #{fzf "--header=\\\"\\$(head -5 #{__FILE__})\\\" --reverse"}", :Enter816 header = File.readlines(__FILE__).take(5).map(&:strip)816 tmux.send_keys "seq 100 | #{fzf "--header=\\\"\\$(head -5 #{FILE})\\\" --reverse"}", :Enter817 header = File.readlines(FILE).take(5).map(&:strip)818 tmux.until do |lines|819 lines[1].include?('100/100') &&820 lines[2..6].map(&:strip) == header821 end822 end823824 def test_header_and_header_lines824 tmux.send_keys "seq 100 | #{fzf "--header-lines 10 --header \\\"\\$(head -5 #{__FILE__})\\\""}", :Enter825 header = File.readlines(__FILE__).take(5).map(&:strip)825 tmux.send_keys "seq 100 | #{fzf "--header-lines 10 --header \\\"\\$(head -5 #{FILE})\\\""}", :Enter826 header = File.readlines(FILE).take(5).map(&:strip)827 tmux.until do |lines|828 lines[-2].include?('90/90') &&829 lines[-7...-2].map(&:strip) == header &&830 lines[-17...-7].map(&:strip) == (1..10).map(&:to_s).reverse831 end832 end833834 def test_header_and_header_lines_reverse834 tmux.send_keys "seq 100 | #{fzf "--reverse --header-lines 10 --header \\\"\\$(head -5 #{__FILE__})\\\""}", :Enter835 header = File.readlines(__FILE__).take(5).map(&:strip)835 tmux.send_keys "seq 100 | #{fzf "--reverse --header-lines 10 --header \\\"\\$(head -5 #{FILE})\\\""}", :Enter836 header = File.readlines(FILE).take(5).map(&:strip)837 tmux.until do |lines|838 lines[1].include?('90/90') &&839 lines[2...7].map(&:strip) == header &&840 lines[7...17].map(&:strip) == (1..10).map(&:to_s)
359 unmodified lines