Commit Graph

30 Commits

Author SHA1 Message Date
Daniel Hahler
b2d6a6891e findoption_len: treat viminfo/viminfofile as aliases
Ref: https://github.com/neovim/neovim/pull/10672#issuecomment-524716824
2019-08-26 09:39:00 +02:00
Justin M. Keyes
9d7aaf7149 lua/shared: move table util funcs to vim.shared
Use `tbl_` prefix for all table-util functions. Specify in the function
docstring if it expects a list-like or map-like table.
2019-05-18 21:07:30 +02:00
Justin M. Keyes
fd04877eb0 test: remove use of require('test.helpers')
The test.functional.helpers and test.unit.helpers modules now include
all of the public functions from test.helpers, so there is no need to
separately require('test.helpers').
2019-05-18 15:48:13 +02:00
Justin M. Keyes
769f44e918 win/defaults: Use "…/nvim-data/site" in 'runtimepath'
On Windows we store non-config data in "$XDG_DATA_HOME/nvim-data". But
the "…/site" items in 'runtimepath' did not correctly point to that
location, they used "…/nvim/site".

Fix the init logic to use  "…/nvim-data/site".

closes #9910
2019-04-28 00:27:07 +02:00
Justin M. Keyes
17291642bd test: clear(): args_rm parameter 2019-04-27 16:19:40 +02:00
Justin M. Keyes
f0a7e3fc9a test: 'shadafile' default
ref 773bdd41ec
2019-04-27 16:19:40 +02:00
Justin M. Keyes
489d32f2b8
startup: fix ":if 0|syntax on|endif" bug (#8731)
Problem: ":if 0|syntax {on,off}|endif" skips the default of "syntax on"
because the executor was setting the `did_syntax_onoff` flag even though
"syntax {on,off}" is not actually executed.

closes #8728
2018-07-18 14:30:11 +02:00
Justin M. Keyes
26d5a981eb do not pass NULL to os_getenv
closes #8393
2018-05-18 19:04:37 +02:00
James McCoy
ec459965f5
test/options: Fix stdpath() failures on Windows 2018-04-01 22:40:20 -04:00
Christian Höltje
868b84199e eval: Add stdpath() method (#5297)
Adds the :stdpath method for fetching XDG standard directories.

Fixes #5297
2018-03-29 10:41:04 -04:00
Matthieu Coudron
384a39479a 'fillchars': fix defaults logic; handle ambiwidth=double #7986
Update tests.
2018-02-23 00:48:35 +01:00
Justin M. Keyes
4fedad6c5b Merge #7753 'win: enable more functional tests' 2018-01-06 17:52:14 +01:00
Jan Edmund Lazo
7311fb7cad win: enable more functional tests
- plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on
  BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set
  fileformat=unix'.
2018-01-06 17:47:00 +01:00
Justin M. Keyes
7c4bb23ff3 defaults: do :filetype stuff unless explicitly "off"
Until now, the default `:filetype ...` setup was skipped if the user
config touched `:filetype` in any way (including implicitly via `:syntax
on`).  No one needs that, and it's very confusing.

Instead, proceed with `:filetype ... on` unless the user explicitly
called `:filetype ... off`.

closes #7765
2018-01-04 10:32:09 +01:00
Justin M. Keyes
d07661b9a3 log: Fall back to CWD-relative .nvimlog
If if the resolved $NVIM_LOG_FILE *and* stdpath("data")/log cannot be
created (e.g. because the XDG data directory does not exist), fall back
to .nvimlog in the current direcrtory.
2017-06-07 00:27:26 +02:00
Justin M. Keyes
bb96b8219d log: set $NVIM_LOG_FILE; fallback to $XDG_DATA_HOME/nvim/log 2017-06-07 00:26:56 +02:00
James McCoy
e20691ccb4
defaults_spec: Test changing :filetype/:syntax in -c, after defaults 2017-04-27 09:20:03 -04:00
ZyX
65fb622000 functests: Replace execute with either command or feed_command
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:

1. msgpackparse() will show internal error: hash_add() in case of duplicate
   keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
   expected. Test was still functioning somehow though. Currently fixed.
2017-04-09 03:24:08 +03:00
Justin M. Keyes
a90beeadbb defaults: 'showcmd', 'belloff', 'ruler'
- Vim "unix default" of 'noshowcmd' is serving few users. And it's
  inconsistent.
- 'ruler' and 'belloff=all' improve the out-of-the-box experience.
- Continue to use 'noshowcmd' and 'noruler' by default in the functional
  tests to keep them fast.

TODO: Add a "disable slow stuff" command or mapping to address the
use-case of a very slow terminal connection.
2017-03-16 18:44:10 +01:00
Justin M. Keyes
224f99b85d win: Append process dir to $PATH
This allows executables to be found by :!, system(), and executable() if
they live next to ("sibling" to) nvim.exe. This is what gvim on Windows
does, and also matches the behavior of Win32 SearchPath().

c4a249a736/src/os_win32.c (L354-L370)
2017-02-04 11:07:49 +01:00
Rui Abreu Ferreira
32156f06f7 XDG: Windows: resolve $LOCALAPPDATA, $TEMP (#5278)
After #4964 environment variables in the XDG "fallback" table are no
longer expanded.

Fallback to correctly expanded $LOCALAPPDATA, $TEMP. If that fails
(unlikely), fallback to hard-coded paths (e.g. ~/AppData/Local).

Closes #5255
2017-01-08 03:18:00 +01:00
Rui Abreu Ferreira
39c628d031 Mark some functional tests as pending in Windows 2016-08-26 08:21:41 +01:00
James McCoy
84bf53b803
Set the default value for 'packpath'
As noted in “:help 'packpath'”, the default value is supposed to be the
same as that for 'runtimepath'.  This was missed in the original port of
the packages functionality from Vim.

Closes #5193
2016-08-08 18:19:26 -04:00
ZyX
9767b9f00f functests: Also make sure that set all& does not expand 2016-07-10 02:04:27 +03:00
ZyX
3878626c05 functests: Add tests for XDG defaults 2016-07-10 02:04:27 +03:00
ZyX
895f712df8 option: Do not expand options, obtained from XDG vars
It is a wrong thing to do, this makes valid variable values be treated 
incorrectly: in

    XDG_DATA_HOME='/home/$foo/.local/share'

`$foo` should be treated literally and not expanded to `foo` environment 
variable value.

Also makes option_expand not try to expand too long strings even if these too 
long strings are default values. Previously it thought that default values 
should always be expanded. Also does not try to expand NULL should it be the 
default value just in case.

Fixes #4961
2016-07-10 02:04:27 +03:00
Justin M. Keyes
173d366a5b test: TUI colors ('t_Co') 2016-07-03 01:29:00 -04:00
ZyX
ff470bb853 functests: Check logs in lua code
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
2016-06-10 21:50:49 +03:00
KillTheMule
360d0513d1 Satisfy testlint.
For that, make luatest ignore the preload.lua files.
2016-04-28 19:30:17 +02:00
Justin M. Keyes
523ff9c55c test: defaults_spec.lua 2016-04-15 02:23:27 -04:00