From ba6d1b8772ce5e75ff999dcca21c0fadb689d7bf Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 28 Mar 2025 23:35:20 +0900 Subject: Add change-ghost and transform-ghost --- test/test_core.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_core.rb b/test/test_core.rb index c8b73f23..f8a182f8 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -1815,7 +1815,7 @@ class TestCore < TestInteractive end def test_ghost - tmux.send_keys %(seq 100 | #{FZF} --prompt 'X ' --ghost 'Type in query ...'), :Enter + tmux.send_keys %(seq 100 | #{FZF} --prompt 'X ' --ghost 'Type in query ...' --bind 'space:change-ghost:Y Z' --bind 'enter:transform-ghost:echo Z Y'), :Enter tmux.until do |lines| assert_equal 100, lines.match_count assert_includes lines, 'X Type in query ...' @@ -1830,6 +1830,10 @@ class TestCore < TestInteractive assert_equal 100, lines.match_count assert_includes lines, 'X Type in query ...' end + tmux.send_keys :Space + tmux.until { |lines| assert_includes lines, 'X Y Z' } + tmux.send_keys :Enter + tmux.until { |lines| assert_includes lines, 'X Z Y' } end def test_ghost_inline -- cgit v1.2.3