diff options
author | Jack Bates <jack@nottheoilrig.com> | 2020-02-20 17:51:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 09:51:34 +0900 |
commit | 9c293bb82b6be333c857d288d10aab730220a0e7 (patch) | |
tree | c93e417c02b03cf8927dfc7b573cc0419bc00f06 /test | |
parent | 9897ee959186f2c8d5908966c10cb6593df945a1 (diff) |
[bash] Put C-t items at point in vi mode (#1876)
Be consistent with emacs mode and put the items at the point vs. the end
of the command line.
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_go.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 22862d7d..4d850d2f 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -115,7 +115,7 @@ class Tmux end def paste(str) - `tmux setb '#{str.gsub("'", "'\\''")}' \\; pasteb -t #{win} \\; send-keys -t #{win} Enter` + system('tmux', 'setb', str, ';', 'pasteb', '-t', win, ';', 'send-keys', '-t', win, 'Enter') end def capture(pane = 0) @@ -491,7 +491,7 @@ class TestGoFZF < TestBase end def test_query_unicode - tmux.paste "(echo abc; echo 가나다) | #{fzf :query, '가다'}" + tmux.paste "(echo abc; echo $'\\352\\260\\200\\353\\202\\230\\353\\213\\244') | #{fzf :query, "$'\\352\\260\\200\\353\\213\\244'"}" tmux.until { |lines| lines[-2].include? '1/2' } tmux.send_keys :Enter assert_equal ['가나다'], readonce.split($INPUT_RECORD_SEPARATOR) @@ -1774,7 +1774,7 @@ module TestShell tmux.until { |lines| lines.select_count == 2 } tmux.send_keys :Enter - tmux.until { |lines| lines.any_include?(/echo.*fzf-unicode.*1.*fzf-unicode.*2/) } + tmux.until { |lines| lines.join.match(/echo.*fzf-unicode.*1.*fzf-unicode.*2/) } tmux.send_keys :Enter tmux.until { |lines| lines.any_include?(/^fzf-unicode.*1.*fzf-unicode.*2/) } end @@ -1991,7 +1991,7 @@ module CompletionTest def test_file_completion_unicode FileUtils.mkdir_p '/tmp/fzf-test' - tmux.paste 'cd /tmp/fzf-test; echo -n test3 > "fzf-unicode 테스트1"; echo -n test4 > "fzf-unicode 테스트2"' + tmux.paste "cd /tmp/fzf-test; echo -n test3 > $'fzf-unicode \\355\\205\\214\\354\\212\\244\\355\\212\\2701'; echo -n test4 > $'fzf-unicode \\355\\205\\214\\354\\212\\244\\355\\212\\2702'" tmux.prepare tmux.send_keys 'cat fzf-unicode**', :Tab tmux.until { |lines| lines.match_count == 2 } |