summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-07-28 13:06:57 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-07-28 13:06:57 +0900
commitf092e4038fd1344bcd0a7c11f7ab7355734f7275 (patch)
treed2247550c1cf0452366e135cfbda252134016f3e /test
parentaa5dae391b1e0de23996ddebeda7d15041d1ad0b (diff)
Smart match of accented characters
Fix #1618
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 75e84ec4..2afb5b81 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -1805,6 +1805,14 @@ class TestGoFZF < TestBase
tmux.until { |lines| lines.item_count == 1 }
tmux.until { |lines| assert_match %r{121.*121/1000}, lines[1] }
end
+
+ def test_normalized_match
+ echoes = '(echo a; echo á; echo A; echo Á;)'
+ assert_equal %w[a á A Á], `#{echoes} | #{FZF} -f a`.lines.map(&:chomp)
+ assert_equal %w[á Á], `#{echoes} | #{FZF} -f á`.lines.map(&:chomp)
+ assert_equal %w[A Á], `#{echoes} | #{FZF} -f A`.lines.map(&:chomp)
+ assert_equal %w[Á], `#{echoes} | #{FZF} -f Á`.lines.map(&:chomp)
+ end
end
module TestShell