diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-02-23 19:47:56 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-02-23 19:47:56 +0900 |
| commit | 461115afde3041cff31c27e490d7c28c0b6c28c4 (patch) | |
| tree | aaec0ce4a82dd50842ea9b5bd49e59135705fc79 /test | |
| parent | bae196523189988d9d5fa2a13880f9b1f36dedf0 (diff) | |
| download | fzf-461115afde3041cff31c27e490d7c28c0b6c28c4.tar.gz | |
Add support for {n} in --with-nth and --accept-nth templates
Close #4275
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_core.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_core.rb b/test/test_core.rb index eb60e815..a68a8e95 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -1801,11 +1801,11 @@ class TestCore < TestInteractive end def test_accept_nth_template - tmux.send_keys %(echo "foo ,bar,baz" | #{FZF} -d, --accept-nth '1st: {1}, 3rd: {3}, 2nd: {2}' --sync --bind start:accept > #{tempname}), :Enter + tmux.send_keys %(echo "foo ,bar,baz" | #{FZF} -d, --accept-nth '[{n}] 1st: {1}, 3rd: {3}, 2nd: {2}' --sync --bind start:accept > #{tempname}), :Enter wait do assert_path_exists tempname # Last delimiter and the whitespaces are removed - assert_equal ['1st: foo, 3rd: baz, 2nd: bar'], File.readlines(tempname, chomp: true) + assert_equal ['[0] 1st: foo, 3rd: baz, 2nd: bar'], File.readlines(tempname, chomp: true) end end end |
