summaryrefslogtreecommitdiffstatshomepage
path: root/test/unit/tempfile_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-15test: replace busted with local harnessLewis Russell1
Replace the busted-based Lua test runner with a repo-local harness. The new harness runs spec files directly under `nvim -ll`, ships its own reporter and lightweight `luassert` shim, and keeps the helper/preload flow used by the functional and unit test suites. Keep the file boundary model shallow and busted-like by restoring `_G`, `package.loaded`, `package.preload`, `arg`, and the process environment between files, without carrying extra reset APIs or custom assertion machinery. Update the build and test entrypoints to use the new runner, add black-box coverage for the harness itself, and drop the bundled busted/luacheck dependency path. AI-assisted: Codex
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-03-11test: correct order of arguments to eq() (#27816)zeertzjq1
2023-04-04test: replace lfs with luv and vim.fsdundargoc1
test: replace lfs with luv luv already pretty much does everything lfs does, so this duplication of dependencies isn't needed.
2022-06-30feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes1
Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
2017-03-16unittests: avoid using pattern matching on file namesJohn Szakmeister1
The directory name could contain special characters that trips up the matching used by find. Instead, let's just make sure that the filename starts with the directory name.
2017-03-12unittests: Use more adequate names for some functionsZyX1
2017-03-11unittests: Do not import libnvim or headers in main processZyX1
Slows down unit tests much, but gets rid of as much preserved state as possible.
2017-03-11unittests: Run all unit tests in their own processesZyX1
Used sed -r -i -e '/ helpers =/ s/$/\nlocal itp = helpers.gen_itp(it)/; s/^(\s*)it\(/\1itp(/' test/unit/**/*_spec.lua to alter all tests. Locally they all run fine now. Reasoning: 1. General: state from one test should not affect other tests. 2. Local: travis build is failing with something which may be an output of garbage collector. This should prevent state of the garbage collector from interferring as well.
2016-07-06os/fs: Rename os_file_exists to os_path_exists (#4973)Daniel Xu1
Because the old name did not indicate that the function would return true on directories as well.
2016-05-06test/functional: clear the temp directory before each tempfile testJohn Szakmeister1
It's possible that the first test encounters a temp directory with files in it, due to a previous test causing the first test to fail. Instead, let's clean up before and after the test to make sure the temp area is pristine before and after the test.
2016-04-20Merge tempfile.c back into fileio.cJurica Bradaric1
2015-07-01test: Ensure proper initialization in unit/helpers.luaThiago de Arruda1
Remove helpers.vim_init and simply perform the required initialization in helpers.lua.
2014-09-11unit tests: initialize everythingJustin M. Keyes1
2014-09-11unit tests: avoid global scope; add missing cimportsJustin M. Keyes1
temporarily comment out call to vim_deltempdir() to avoid segfault
2014-07-22Statically allocate NameBuffWayne Rowcliffe1
2014-07-14tempfile.c: add testsPavel Platto1