Add fuzzy git file finderZ

This commit is contained in:
TJ DeVries
2020-08-24 12:31:57 -04:00
parent cfddae42f5
commit 1995ca53f3
6 changed files with 147 additions and 26 deletions

View File

@@ -1,5 +1,8 @@
require('plenary.test_harness'):setup_busted()
local log = require('telescope.log')
-- log.use_console = false
local pickers = require('telescope.pickers')
local utils = require('telescope.utils')
@@ -179,4 +182,20 @@ describe('Picker', function()
end)
end)
describe('Sorters', function()
describe('norcalli_sorter', function()
it('sort matches well', function()
local sorter = require('telescope.sorters').get_norcalli_sorter()
local exact_match = sorter:score('hello', 'hello')
local no_match = sorter:score('abcdef', 'ghijkl')
local ok_match = sorter:score('abcdef', 'ab')
assert(exact_match < no_match)
assert(exact_match < ok_match)
assert(ok_match < no_match)
end)
end)
end)