diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-09-12 11:37:55 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-09-12 11:37:55 +0900 |
commit | 64443221aab288a3069d01cdaf86706c6c1d91f3 (patch) | |
tree | 0520ba323fd6be1421d35a8a94b9b5cd42a74189 /test | |
parent | 9017e297417bc20c89e1e7c9ce47f1c2fbbfd5fc (diff) |
Fix #344 - Backward scan when `--tiebreak=end`
Diffstat (limited to 'test')
-rw-r--r-- | test/test_go.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 377af229..d1f45dc1 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -527,6 +527,17 @@ class TestGoFZF < TestBase assert_equal output, `cat #{tempname} | #{FZF} -fh -n2 -d:`.split($/) end + def test_tiebreak_end_backward_scan + input = %w[ + foobar-fb + fubar + ] + writelines tempname, input + + assert_equal input.reverse, `cat #{tempname} | #{FZF} -f fb`.split($/) + assert_equal input, `cat #{tempname} | #{FZF} -f fb --tiebreak=end`.split($/) + end + def test_invalid_cache tmux.send_keys "(echo d; echo D; echo x) | #{fzf '-q d'}", :Enter tmux.until { |lines| lines[-2].include? '2/3' } |