m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 15:53:39 -05:00

Smart match of accented characters

Fix #1618
This commit is contained in:
Junegunn Choi
2020-07-28 13:06:57 +09:00
parent aa5dae391b
commit f092e4038f
3 changed files with 21 additions and 3 deletions

View File

@@ -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