ci: more tests (#359)

* more tests

* lint
This commit is contained in:
TJ DeVries
2020-12-23 13:31:05 -05:00
committed by GitHub
parent 4850c6df6d
commit 049602a2c5
5 changed files with 93 additions and 54 deletions

View File

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

View File

@@ -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 }
},
})