diff options
Diffstat (limited to 'lua/tests/pickers')
| -rw-r--r-- | lua/tests/pickers/find_files__readme.lua | 2 | ||||
| -rw-r--r-- | lua/tests/pickers/find_files__with_ctrl_n.lua | 27 |
2 files changed, 7 insertions, 22 deletions
diff --git a/lua/tests/pickers/find_files__readme.lua b/lua/tests/pickers/find_files__readme.lua index 6753d5d..620c3be 100644 --- a/lua/tests/pickers/find_files__readme.lua +++ b/lua/tests/pickers/find_files__readme.lua @@ -1,4 +1,4 @@ -local tester = require('telescope.pickers._tests') +local tester = require('telescope.pickers._test') tester.builtin_picker('find_files', 'README.md', { post_close = { diff --git a/lua/tests/pickers/find_files__with_ctrl_n.lua b/lua/tests/pickers/find_files__with_ctrl_n.lua index e6eecdd..78a31fd 100644 --- a/lua/tests/pickers/find_files__with_ctrl_n.lua +++ b/lua/tests/pickers/find_files__with_ctrl_n.lua @@ -1,24 +1,9 @@ -pcall(function() RELOAD('telescope') end) +local tester = require('telescope.pickers._test') +local helper = require('telescope.pickers._test_helpers') -local builtin = require('telescope.builtin') -local tester = require('telescope.pickers._tests') - -local key = 'find_files' -local input = 'fixtures/file<c-p>' -local expected = 'lua/tests/fixtures/file_2.txt' -local get_actual = function() - return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":.") -end - --- local on_complete_item = tester.picker_feed(input, expected, get_actual, true) --- --- builtin[key] { --- on_complete = { on_complete_item } --- } - -tester.builtin_picker('find_files', 'fixtures/file<c-p>', 'lua/tests/fixtures/file_2.txt', function() - return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":.") -end, { - debug = false, +tester.builtin_picker('find_files', 'fixtures/file<c-p>', { + post_close = { + { 'lua/tests/fixtures/file_2.txt', helper.get_file } + }, }) |
