diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-02-12 20:15:04 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-02-12 20:15:04 +0900 |
| commit | 84e2262ad63df2112f16b2a80fc661294c3da45e (patch) | |
| tree | 803f4bf41de9d0011efcc2e29f788ac990fc7c73 /test/test_core.rb | |
| parent | 378137d34a2a11b16c66dff2bf4309c7ce232a94 (diff) | |
| download | fzf-84e2262ad63df2112f16b2a80fc661294c3da45e.tar.gz | |
Make --accept-nth and --with-nth support templates
Diffstat (limited to 'test/test_core.rb')
| -rw-r--r-- | test/test_core.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_core.rb b/test/test_core.rb index 0d7f68f5..0e60b57e 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -1772,4 +1772,13 @@ class TestCore < TestInteractive assert_equal ['bar,bar,foo :,:bazfoo'], File.readlines(tempname, chomp: true) end 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 + 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) + end + end end |
