aboutsummaryrefslogtreecommitdiff
path: root/test/unit/path_spec.lua
Commit message (Collapse)AuthorAge
* refactor: reorganize option header files (#25437)zeertzjq2023-09-30
| | | | | | - Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other
* fix(runtime): respect 'fileignorecase' when sourcing (#24344)zeertzjq2023-07-14
|
* test: replace lfs with luv and vim.fsdundargoc2023-04-04
| | | | | | test: replace lfs with luv luv already pretty much does everything lfs does, so this duplication of dependencies isn't needed.
* test(unit): use file:close() properly (#21505)zeertzjq2022-12-22
|
* fix(path): don't remove trailing slash when getting absolute path (#20853)zeertzjq2022-10-30
| | | | | | Before Vim patch 8.2.3468 relative_directory is never used in the resulting path name, so whether it has a trailing slash didn't matter. Now path_full_dir_name() appends a non-existing relative directory to the current directory name, so the trailing slash needs to be kept.
* fix(path): path_is_url returns false for "foo:/" #19797sigmaSd2022-08-23
| | | | | | | | | | | | | | | Problem: path_to_url() returns false for single-slash URIs ("foo:/" vs "foo://"). This is not compliant with the URI spec. https://url.spec.whatwg.org/#url-representation LSP in particular allows single-slash URIs. Solution: Relax path_to_url() to accept single-slash URIs. This is not fully compliant (only ":" is required by the spec), but it is hopefully good enough without causing false-positives in typical text files. ref https://url.spec.whatwg.org/#windows-drive-letter ref https://github.com/neovim/neovim/pull/19773 ref https://github.com/neovim/neovim/pull/19773#issuecomment-1214763769
* test(unit): add unit tests for path_with_urlzeertzjq2022-01-24
|
* vim-patch:8.2.3468: problem with :cd when editing file in non-existent directoryzeertzjq2021-11-19
| | | | | | | Problem: Problem with :cd when editing file in non-existent directory. (Yee Cheng Chin) Solution: Prepend the current directory to get the full path. (closes vim/vim#8903) https://github.com/vim/vim/commit/c6376c798433bcb9ee38a8664299d11454546950
* path: add helper for checking a file extensiondm1try2020-12-01
|
* vim-patch:8.1.1371: cannot recover from a swap file #11081Jurica Bradarić2019-10-05
| | | | | | | Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes vim/vim#4369) https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
* tests: improve error message with literat "~" directory (#11032)Daniel Hahler2019-09-17
|
* refactor/rename: path_try_shorten_fname()Justin M. Keyes2018-03-24
|
* refactor/rename: path_is_absolute()Justin M. Keyes2018-03-24
|
* test/unit/path_spec: expect correct buffer size (#7514)Marco Hinz2017-11-13
| | | | Fixed-size buffers and lfs.currentdir().. does not compute. The tests would fail if the current working directory was longer than expected.
* test: avoid extra clear() callsJustin M. Keyes2017-10-02
| | | | also: various other cleanup
* win: vim_FullName(): force backslashes #7287Ignas Anikevicius2017-10-02
| | | | | | | | | - Replace obvious cases of '/' literal with PATHSEP. (There are still some remaining cases that need closer inspection.) - Fixup tests: ui/screen_basic closes #7117 ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714
* startup: v:progpath fallback: path_guess_exepathJustin M. Keyes2017-05-15
| | | | | | | If procfs is missing then libuv cannot find the exe path. Fallback to path_guess_exepath(), adapted from Vim findYourself(). Closes #6734
* test/fs: sanity check for literal "~" directory (#6579)Justin M. Keyes2017-04-24
| | | | If the CWD contains a directory with the literal name "~" then the tests will have bogus failures.
* unittests: Do not import libnvim or headers in main processZyX2017-03-11
| | | Slows down unit tests much, but gets rid of as much preserved state as possible.
* unittests: Check core dumps in after_each, like in functestsZyX2017-03-11
|
* unittests: Run all unit tests in their own processesZyX2017-03-11
| | | | | | | | | | | | | | | 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.
* path.c: `vim_FullName()`: Fix heap overflow #5737nfnty2017-01-05
| | | | | | - Clarify documentation. - Return `FAIL` and truncate if `fname` is too long. - Add tests.
* test/unit: clean up according to luacheckMarco Hinz2015-11-23
|
* os/path: Fix path_get_absolute_path for top-level pathsThiago de Arruda2015-09-18
| | | | Close #2833
* tests: Fix test setup/teardown in path_spec.lua #2402David Bürgin2015-04-12
| | | | | | | | A call to lfs.mkdir instead of lfs.rmdir left a temp directory hanging around. Changed to do proper setup/teardown using {before,after}_each. Helped-by: Scott Prager <splinterofchaos@gmail.com> Suggested-by: Scott Prager <splinterofchaos@gmail.com>
* path_fix_case: unit testScott Prager2015-03-31
|
* unit tests: avoid global scope; add missing cimportsJustin M. Keyes2014-09-11
| | | | temporarily comment out call to vim_deltempdir() to avoid segfault
* unittest: convert path_spec.moon to luaThiago de Arruda2014-08-31