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

Fix missing NFD conversion in extended-search mode

This commit is contained in:
Junegunn Choi
2013-11-17 11:20:06 +09:00
parent 90adda73b0
commit 6a5e1de6f3
3 changed files with 22 additions and 7 deletions

View File

@@ -296,6 +296,21 @@ class TestFZF < MiniTest::Unit::TestCase
assert_equal 6, nfd.length
assert_equal NFD, nfd
end
def test_nfd_fuzzy_matcher
matcher = FZF::FuzzyMatcher.new 0
match = matcher.match([NFD], '할', '', '')
assert_equal [[NFD, [[0, 6]]]], match
assert_equal ['한글', [[0, 2]]], FZF::UConv.nfc(*match.first)
end
def test_nfd_extended_fuzzy_matcher
matcher = FZF::ExtendedFuzzyMatcher.new 0
assert_equal [], matcher.match([NFD], "'할", '', '')
match = matcher.match([NFD], "'한글", '', '')
assert_equal [[NFD, [[0, 6]]]], match
assert_equal ['한글', [[0, 2]]], FZF::UConv.nfc(*match.first)
end
end
def test_split