aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval
Commit message (Collapse)AuthorAge
...
| * functests: Add some more testsZyX2017-02-23
| |
| * buffer: Forbid unletting b:changedtickZyX2017-02-23
| |
| * eval: Refactor item_lockZyX2017-02-23
| | | | | | If I am not mistaking, this commit should not change any functionality.
| * eval: Make sure that b:changedtick may not be unlocked via :unlo b:varZyX2017-02-23
| | | | | | It still may be unlocked by `:unlock b:.var`.
| * functests: Add testsZyX2017-02-23
| | | | | | Contains a number of FIXMEs.
* | Merge #6111 from ZyX-I/split-eval'/os-fileioJustin M. Keyes2017-02-27
|\ \ | |/ |/| Refactor writefile() and create more tests for it
| * eval: Fix error messages from writefileZyX2017-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When calling writefile(list, fname, []) do not show error message twice. 2. Do not allow file name to be overwritten for writefile([1], 2). 3. Do not show “Can’t open file with an empty name” error after error like “using Float as a String” when type of the second argument is not correct. 4. Do not give multiple error messages and still continue for code like `writefile(["test", [], [], [], "tset"])`. Note that to fix 4. ideally I need tv_check_str_or_nr which is currently present in two PRs: #6114 and #5119. I would want to avoid copying this function into a yet another PR. Ref vim/vim#1476.
| * eval: writefile: Give more adequate IO errors and do not call putc()ZyX2017-02-14
| |
* | eval.c: has("unnamedplus"). (#6136)Kurt Bonatz2017-02-18
| | | | | | | | | | Return 1 for UNIX with a functioning clipboard provider. Closes #6103
* | *: Partial string handling refactoringZyX2017-02-15
|/ | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* eval: Add id() function and make printf("%p") return something useful (#6095)Nikolai Aleksandrovich Pavlov2017-02-11
|
* test: executable(): AppVeyor: Ignore "sibling" failureJustin M. Keyes2017-02-04
| | | | | This test sometimes fails on AppVeyor, but we still want to exercise the code path and get at least a "soft" notification in the pending list.
* win: executable(): full path without extensionJustin M. Keyes2017-02-04
| | | | Absolute path is considered executable even *without* an extension.
* vim-patch:8.0.0280Justin M. Keyes2017-02-04
| | | | | | | | | | patch 8.0.0280: problem setting multi-byte environment var on MS-Windows Problem: On MS-Windows setting an environment variable with multi-byte strings does not work well. Solution: Use wputenv when possible. (Taro Muraoka, Ken Takata) 7c23d1d9d9cc
* win: Append process dir to $PATHJustin M. Keyes2017-02-04
| | | | | | | | 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(). https://github.com/vim/vim/blob/c4a249a736d40ec54794827ef95804c225d0e38f/src/os_win32.c#L354-L370
* test: executable()Rui Abreu Ferreira2017-02-04
|
* Merge pull request #6050 from jamessan/fix-xclip-testsJames McCoy2017-02-03
|\ | | | | Fix xclip tests to cleanup on their own
| * test: Turn printargs_path into a functionJames McCoy2017-02-02
| | | | | | | | | | | | | | | | | | | | When test/functional/eval/system_spec.lua is run on its own, helpers.os_name() was being called before a session had been created. This caused that describe block to fail. Turning printargs_path into a function delays the call of helpers.os_name() until the test is being run, which ensures a session is available.
| * test: Make xclip exit after one selection requestJames McCoy2017-02-02
| | | | | | | | Closes #4900
* | test: execute() + :redirJustin M. Keyes2017-02-01
| |
* | execute: Correctly capture output with highlight attributesJames McCoy2017-02-01
|/ | | | Closes #5422
* test/timer_spec.lua: Relax expected count.Justin M. Keyes2017-01-19
| | | | | | Test sometimes fails on AppVeyor (Windows). 300/50=6, but there could be environment factors that miss the timer interval on the "edges". timer_start() does not have such a hard requirement.
* setpos(): Set lowercase mark in other buffers (#5753)Matthew Malcomson2017-01-15
| | | | | | | | | | | | | Also make setpos("'A", [999, 1, 1, 0]) fail, i.e. return -1 (assuming there is no buffer 999). Fixes #5713 Background: `:help setpos()` mentions an argument `"bufnum"` that determines the buffer a mark should be put in. This argument is respected for uppercase marks, but not for lowercase marks. This is reasonable (though I personally would like `setpos()` to be able to set marks in other buffers), but the help doesn't mention this anywhere. It's also strange that attempting to change buffers with `setpos('.', [bufnr('#'), 1, 1, 0])` alerts the user that having a different buffer is an error, while attempting to set a mark with `setpos("'d", [bufnr('#'), 1, 1, 0])` doesn't tell the user that the `"bufnum"` argument is an error.
* Windows: enable more testsJustin M. Keyes2017-01-13
|
* test: system([...]): v:shell_errorJustin M. Keyes2017-01-11
|
* system([...]): Set v:shell_error=-1 if not executable.Rui Abreu Ferreira2017-01-11
| | | | | | | | Do _not_ set v:shell_error on parameter validation error. system([...]) does not invoke a shell, so this change is somewhat questionable. But `:help v:shell_error` is sufficiently vague to allow -1 in this case.
* test: system([...])Rui Abreu Ferreira2017-01-11
|
* vim-patch:7.4.2008James McCoy2017-01-10
| | | | | | | | Problem: evalcmd() has a confusing name. Solution: Rename to execute(). Make silent optional. Support a list of commands. https://github.com/vim/vim/commit/79815f1ec77406f2f21a618c053e5793b597db7a
* functests: Add tests for new fixesZyX2017-01-06
|
* tests: Add tests for partials dumpingZyX2017-01-03
| | | | | Also fixed dumping of partials by encode_vim_to_object and added code which is able to work with partials and dictionaries to test/unit/eval/helpers.lua (mostly copied from #5119, except for partials handling).
* eval/typval_encode: Fix infinite loopZyX2017-01-03
| | | | | | | | | Occurs when trying to dump a partial with attached self dictionary which references that partial. “Infinite” loop should normally result in Neovim killed by OOM killer. Also moved the place when partials are unreferenced by clear_tv: from …FUNC_START to …FUNC_END.
* os/shell: Throttle :! output, pulse "..." message.Justin M. Keyes2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | Periodically skip :! spam. This is a "cheat" that works for all UIs and greatly improves responsiveness when :! spams MB or GB of output: :!yes :!while true; do date; done :!git grep '' :grep -r '' * After ~10KB of data is seen from a single :! invocation, output will be skipped for ~1s and three dots "..." will pulse in the bottom-left. Thereafter the behavior alternates at every: * 10KB received * ~1s throttled This also avoids out-of-memory which could happen with large :! outputs. Note: This commit does not change the behavior of execute(':!foo'). execute(':!foo') returns the string ':!foo^M', it captures *only* Vim messages, *not* shell command output. Vim behaves the same way. Use system('foo') for capturing shell command output. Closes #1234 Helped-by: oni-link <knil.ino@gmail.com>
* build: Target luacheck HEAD.Justin M. Keyes2016-11-17
| | | | | | | | | | | | https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606 > If you really want to use bleeding-edge version you should get the > rockspec from master branch, not a fixed commit ... > The correct way to install from a specific commit is cloning that > commit and running "luarocks make" from project directory. The reason > is that running "install" or "build" on an scm rockspec fetches > sources from master but uses build description from the rockspec > itself, which may be outdated.
* Bump all nvim-specific error codes above E5000James McCoy2016-11-15
| | | | | | | | | | In order to not conflict with new error codes that Vim adds, all Neovim error codes should be above 5000. The three existing sub-5000 error codes (E926, E951, and E952) are now E50003, E5004, and E5005 respectively. E953 was removed in 6167ce6df2753d5474ad49aea19f5957128ab015, so just remove it from the help.
* encoding: update testsBjörn Linse2016-11-05
| | | | | | | Change shada reencoding tests to check for correct handling of UTF-8 and binary strings. Delete enc=latin1 json tests.
* api: api_info()['version']Justin M. Keyes2016-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | API level is disconnected from NVIM version. The API metadata holds the current API level, and the lowest backwards-compatible level supported by this instance. Release 0.1.6 is the first release that reports the Nvim version and API level. metadata['version'] = { major: 0, minor: 1, patch: 6, api_level: 1, api_compatible: 0, api_prerelease: false, } The API level may remain unchanged across Nvim releases if the API has not changed. When changing the API, - set NVIM_API_PRERELEASE to true - increment NVIM_API_LEVEL (at most once per Nvim version) - adjust NVIM_API_LEVEL_COMPAT if backwards-compatibility was broken api_level_0.mpack was generated from Nvim 0.1.5 with: nvim --api-info
* api: Nvim version, API level #5386Rui Abreu Ferreira2016-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API level is disconnected from the NVIM version. The API metadata holds the current API level, and the lowest backwards-compatible level supported by this instance. Release 0.1.6 will be the first release reporting the Nvim version and API level. metadata['version'] = { major: 0, minor: 1, patch: 6, prerelease: true, api_level: 1, api_compatible: 0, } The API level may remain unchanged across Neovim releases if the API has not changed. When changing the API the CMake variable NVIM_API_PRERELEASE is set to true, and NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented accordingly. The functional tests check the API table against fixtures of past versions of Neovim. It compares all the functions in the old table with the new one, it does ignore some metadata attributes that do not alter the function signature or were removed since 0.1.5. Currently the only fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
* modeline: Handle version number overflow. #5450Florian Larysch2016-10-26
| | | | | | | | | | | Closes #5449 A file containing the string "vim" followed by a very large number in a modeline location will trigger an overflow in getdigits() which is called by chk_modeline() when trying to parse the version number. Add getdigits_safe(), which does not assert overflows, but reports them to the caller.
* version: Allow has("nvim-x"), has("nvim-x.y")Justin M. Keyes2016-10-25
|
* version: has("nvim-1.2.3")Justin M. Keyes2016-10-25
| | | | Helped-by: Daniel Hahler <git@thequod.de>
* test: system(): Avoid indeterminism.Justin M. Keyes2016-10-23
|
* system('foo &', 'bar'): Show error, don't crash.Justin M. Keyes2016-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #3529 Closes #5241 In Vim, :echo system('cat - &', 'foo') works because for both system() and :! Vim writes input to a temp file and uses shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output() .. make_filter_cmd()). In Nvim, :echo system('cat - &', 'foo') fails because we write the input directly via pipes (shell.c:do_os_system()), but (per POSIX[1]) backgrounded process input stream is redirected from /dev/null (unless overridden by shell redirection; supported only by some shells [2]), so our writes are ignored, the process exits quickly, and if we are writing data larger than the buffer size we'll see EPIPE. This still works: :%w !tee > foo1358.txt & but this does not: :%w !tee foo1358.txt & though it *should* (why doesn't it?) because we still do the temp file dance in do_bang() .. do_filter(). [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02 [2] http://unix.stackexchange.com/a/71218
* test: execute_spec: Adjust screen assertion.Justin M. Keyes2016-10-15
| | | | | | The previous form was passing because it happens immediately before this form; but on a very fast(?) server the screen check might miss that form. It's also not really want we want to assert anyways.
* events: allow event processing in getchar()Björn Linse2016-10-15
| | | | | | this is consistent with vim, and is necessary for plugins that implement their own input modes using "getchar()" and still want to do async event processing.
* api: Establish API naming convention. (#5344)Justin M. Keyes2016-09-17
| | | | | | | | | | | | | | | | | | | | | old name: new name: -------------------------------------------------- nvim_name_to_color nvim_get_color_by_name nvim_get_current_buffer nvim_get_current_buf nvim_get_current_window nvim_get_current_win nvim_get_buffers nvim_list_bufs nvim_get_tabpages nvim_list_tabpages nvim_get_windows nvim_list_wins nvim_set_current_buffer nvim_set_current_buf nvim_set_current_window nvim_set_current_win nvim_change_directory nvim_set_current_dir nvim_tabpage_get_window nvim_tabpage_get_win nvim_tabpage_get_windows nvim_tabpage_list_wins nvim_win_get_buffer nvim_win_get_buf nvim_report_error nvim_err_writeln Helped-by: Björn Linse <bjorn.linse@gmail.com> Helped-by: ZyX <kp-pav@yandex.ru> Helped-by: James McCoy <jamessan@jamessan.com>
* api: add tests for calling the api from vimscriptBjörn Linse2016-08-31
|
* Mark some functional tests as pending in WindowsRui Abreu Ferreira2016-08-26
|
* tests: don't ignore highlights in various testsBjörn Linse2016-08-14
|
* timers: do not crash after processing events in the handlerBjörn Linse2016-08-10
|
* eval.c: rename capture() to execute() (#5132)Justin M. Keyes2016-07-31
|