diff --git a/lua/tests/automated/pickers/resume_spec.lua b/lua/tests/automated/pickers/resume_spec.lua new file mode 100644 index 0000000000..74456c2757 --- /dev/null +++ b/lua/tests/automated/pickers/resume_spec.lua @@ -0,0 +1,12 @@ +-- Just skip on mac, it has flaky CI for some reason +if vim.fn.has "mac" == 1 or require("telescope.utils").iswin then + return +end + +local tester = require "telescope.testharness" + +describe("builtin.resume", function() + it("should select and open the file", function() + tester.run_file "resume__select_pos" + end) +end) diff --git a/lua/tests/pickers/resume__select_pos.lua b/lua/tests/pickers/resume__select_pos.lua new file mode 100644 index 0000000000..9b0905dab1 --- /dev/null +++ b/lua/tests/pickers/resume__select_pos.lua @@ -0,0 +1,14 @@ +local helper = require "telescope.testharness.helpers" +local runner = require "telescope.testharness.runner" + +runner.picker("find_files", ".md", { + post_close = { + { "README.md", helper.get_file }, + }, +}) + +runner.picker("resume", "", { + post_close = { + { "developers.md", helper.get_file }, + }, +}, { select_pos = 1 })