diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2020-08-02 10:02:11 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-08-02 10:03:17 +0900 |
| commit | 92b7efafcacfa5c5de2a8f22abd859b8fc994748 (patch) | |
| tree | 8d528a73a88a3339b7dbcd5e87d9dd166b8b03f9 /test | |
| parent | f092e4038fd1344bcd0a7c11f7ab7355734f7275 (diff) | |
| download | fzf-92b7efafcacfa5c5de2a8f22abd859b8fc994748.tar.gz | |
Ignore punctuation characters before and after preview offset column
This is to allow line numbers in a ctags output (e.g. 123;")
Diffstat (limited to 'test')
| -rwxr-xr-x | test/test_go.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 2afb5b81..bb5eb45f 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1801,9 +1801,12 @@ class TestGoFZF < TestBase end def test_preview_scroll_begin_and_offset - tmux.send_keys "echo foo 123 321 | #{FZF} --preview 'seq 1000' --preview-window left:+{2}-2", :Enter - tmux.until { |lines| lines.item_count == 1 } - tmux.until { |lines| assert_match %r{121.*121/1000}, lines[1] } + ['echo foo 123 321', 'echo foo :123: 321'].each do |input| + tmux.send_keys "#{input} | #{FZF} --preview 'seq 1000' --preview-window left:+{2}-2", :Enter + tmux.until { |lines| lines.item_count == 1 } + tmux.until { |lines| assert_match %r{121.*121/1000}, lines[1] } + tmux.send_keys 'C-c' + end end def test_normalized_match |
