neovim/test/functional
Rafael Kitover 085f1cc99d
feat(main): expand file ~\ or ~/ prefix on Windows
In command_line_scan() for MSWIN, expand "~\" or "~/" prefixed paths to
the USERPROFILE environment variable for the user's profile directory.

Rename the static os_homedir() to os_uv_homedir() to emphasize that it
is a wrapper around a libuv function.

Add the function os_get_homedir() to os/env.c to return the cached
homedir value as a const. Must be called after homedir is initialized or
it fails.

The difference between this function and the static os_uv_homedir() is
that the latter gets the homedir from libuv and is used to initialize
homedir in init_homedir(), while os_get_homedir() just returns homedir
as a const if it's initialized and is public.

Use the os_get_homedir() accessor for ~/ expansion on Windows to make
the code more concise.

Add a Windows section to main_spec.lua with tests for expanding ~/ and
~\ prefixes for files passed in on the command-line.

Fix #23901

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-11-19 07:26:37 +08:00
..
api fix(window): making float with title/footer non-float leaks memory (#30551) 2024-09-28 02:44:46 +00:00
autocmd test(autocmd/termxx_spec): properly setup TextChangedT tests (#30788) 2024-10-13 11:29:29 +08:00
core feat(main): expand file ~\ or ~/ prefix on Windows 2024-11-19 07:26:37 +08:00
editor feat(jumplist): allow opting out of removing unloaded buffers (#30419) 2024-09-19 10:32:50 +00:00
ex_cmds fix(quickfix): make shortmess+=O work with cmdheight=0 (#29609) 2024-07-08 02:36:58 +00:00
fixtures NVIM v0.10.0 2024-05-16 14:34:32 +02:00
legacy test(012_directory_spec): fix flakiness on Windows (#30921) 2024-10-24 11:57:40 +08:00
lua ci: bump macos runner version to macos-15 2024-11-09 13:11:47 +01:00
options test: improve test conventions 2024-04-23 18:17:04 +02:00
plugin test(health): "test_plug/health/init.lua" completes as "test_plug" 2024-09-11 16:07:29 +01:00
provider test: improve test conventions 2024-04-23 18:17:04 +02:00
script docs(luacats): support backtick captured generic type 2024-05-07 14:33:14 +01:00
shada test: improve test conventions 2024-04-23 18:17:04 +02:00
terminal fix(tui): avoid flushing buffer halfway an OSC 2 sequence (#30793) 2024-10-15 00:18:12 +00:00
treesitter fix(treesitter): show proper node name error messages 2024-11-13 13:03:00 +00:00
ui fix(inccommand): ensure cursor is where it belongs 2024-11-09 15:26:32 +00:00
vimscript test: improve test conventions 2024-04-23 18:17:04 +02:00
example_spec.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
preload.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
testnvim.lua test: do not set termguicolors in test runner 2024-06-13 01:09:49 +00:00