diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-01-21 18:17:35 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-01-21 18:17:44 +0100 |
commit | 497db001dfbf5f35e32f9aceabde145a6669ce8a (patch) | |
tree | 4a6acde59510d46735449b31fe3bd83ef37ade51 /src | |
parent | bd16e116ebb3026cc72006e1e5376236181ac1c7 (diff) | |
download | rneovim-497db001dfbf5f35e32f9aceabde145a6669ce8a.tar.gz rneovim-497db001dfbf5f35e32f9aceabde145a6669ce8a.tar.bz2 rneovim-497db001dfbf5f35e32f9aceabde145a6669ce8a.zip |
test: expand_env_esc()
Test expand_env_esc() using the same parameters reported in #3725.
Closes #3725
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/os/env.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index 47d541c6a7..109b5c7175 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -226,25 +226,24 @@ char_u *expand_env_save_opt(char_u *src, bool one) /// "~/" is also expanded, using $HOME. For Unix "~user/" is expanded. /// Skips over "\ ", "\~" and "\$" (not for Win32 though). /// If anything fails no expansion is done and dst equals src. -/// @param src Input string e.g. "$HOME/vim.hlp" -/// @param dst Where to put the result -/// @param dstlen Maximum length of the result +/// +/// @param src Input string e.g. "$HOME/vim.hlp" +/// @param dst[out] Where to put the result +/// @param dstlen Maximum length of the result void expand_env(char_u *src, char_u *dst, int dstlen) { expand_env_esc(src, dst, dstlen, false, false, NULL); } /// Expand environment variable with path name and escaping. -/// "~/" is also expanded, using $HOME. For Unix "~user/" is expanded. -/// Skips over "\ ", "\~" and "\$" (not for Win32 though). -/// If anything fails no expansion is done and dst equals src. -/// prefix recognize the start of a new name, for '~' expansion. -/// @param srcp Input string e.g. "$HOME/vim.hlp" -/// @param dst Where to put the result -/// @param dstlen Maximum length of the result -/// @param esc Should we escape spaces in expanded variables? -/// @param one Should we expand more than one '~'? -/// @param prefix Common prefix for paths, can be NULL +/// @see expand_env +/// +/// @param srcp Input string e.g. "$HOME/vim.hlp" +/// @param dst[out] Where to put the result +/// @param dstlen Maximum length of the result +/// @param esc Escape spaces in expanded variables +/// @param one `srcp` is a single filename +/// @param prefix Start again after this (can be NULL) void expand_env_esc(char_u *restrict srcp, char_u *restrict dst, int dstlen, |