diff options
author | Rory Nesbitt <ranesbitt@live.co.uk> | 2023-09-27 18:09:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 10:09:55 -0700 |
commit | a66b0fdfaa35715c832b98b8941cc5673505e0c2 (patch) | |
tree | c61ba5de9fcbcccb9209657cbe3013a0881a385d /test/functional/core/fileio_spec.lua | |
parent | bfdec5b0e71991ebc0a8ad7c12d39f7a9cc56f07 (diff) | |
download | rneovim-a66b0fdfaa35715c832b98b8941cc5673505e0c2.tar.gz rneovim-a66b0fdfaa35715c832b98b8941cc5673505e0c2.tar.bz2 rneovim-a66b0fdfaa35715c832b98b8941cc5673505e0c2.zip |
feat: NVIM_APPNAME supports relative paths #25233
Problem:
NVIM_APPNAME does not allow path separators in the name, so relative
paths can't be used:
NVIM_APPNAME="neovim-configs/first-config" nvim
NVIM_APPNAME="neovim-configs/second-config" nvim
Solution:
Let NVIM_APPNAME be a relative path. Absolute paths are not supported.
fix #23056
fix #24966
Diffstat (limited to 'test/functional/core/fileio_spec.lua')
-rw-r--r-- | test/functional/core/fileio_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua index 8de78234ce..f2b360f0d8 100644 --- a/test/functional/core/fileio_spec.lua +++ b/test/functional/core/fileio_spec.lua @@ -377,4 +377,14 @@ describe('tmpdir', function() rm_tmpdir() eq('E5431: tempdir disappeared (3 times)', meths.get_vvar('errmsg')) end) + + it('$NVIM_APPNAME relative path', function() + clear({ env={ + NVIM_APPNAME='a/b', + NVIM_LOG_FILE=testlog, + TMPDIR=os_tmpdir, + } }) + matches([=[.*[/\\]a%%b%.[^/\\]+]=], funcs.tempname()) + end) + end) |