aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds
Commit message (Collapse)AuthorAge
* Add some tests and cleanup.Michael Ennen2016-12-12
|
* Make partials work with jobs, timers, and dictwatchers.Björn Linse2016-12-12
|
* 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.
* 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.
* ex_global: Catch CTRL-C even if it is mapped.Justin M. Keyes2016-10-30
| | | | | Problem: If CTRL-C is mapped, it does not interrupt :global output. Solution: clear `mapped_ctrl_c` during :global.
* os_nodetype: open fd with O_NONBLOCK (#5515)Justin M. Keyes2016-10-21
| | | | | Closes #5267 Helped-by: oni-link <knil.ino@gmail.com>
* 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: system(): backgrounded shell commandJustin M. Keyes2016-10-19
| | | | | | | | | | | | | | | These tests are essentially affirming a regression vs Vim. In Vim, :echo system('cat - &', 'foo') returns "foo", because Vim internally wraps the command with shell-specific syntax to redirect the streams from /dev/null[1]. That can't work in Nvim because we use pipes directly (instead of temp files) and don't wrap the command with shell-specific redirection syntax. References #3529 References #5241 [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
* main.c: "BufReadCmd term://": Skip existing terminal.Justin M. Keyes2016-10-12
| | | | | | | | | Check `exists('b:term_title')` to avoid the BufReadCmd for already-initialized :terminal buffers. Move the test for `:argadd`. Add a test for `:edit<CR>`. Tweak comments and code style.
* CI: test: Avoid QuickBuild hang. (#5330)Justin M. Keyes2016-09-12
| | | Delete the CWD using nvim instead of the external lua/test runner process.
* getcwd(): Return empty string if CWD is invalid. #5292HiPhish2016-09-04
| | | | | | | | | | Closes #5291 Restores behaviour identical to Vim. If the user calls the VimScript function 'getcwd()' and the working directory cannot be found (for example because the directory has been deleted since the last time it was used) an empty string needs to be returned instead of throwing an error.
* tchdir: New tab should inherit CWD. (#5227)Alejandro Sanchez2016-09-04
| | | | When a new tabpage gets created it will copy the local working directory of the previous one, if there is any.
* functionaltest: Create lua helper for os.tmpname()Rui Abreu Ferreira2016-08-31
| | | | | | | | | | | | | | | In Windows Lua's os.tmpname() returns relative paths starting with \s, prepend them with $TEMP to generate a valid path. In OS X os.tmpname() returns paths in '/tmp' but they should be in '/private/tmp'. We cannot use os_name() for platform detection because some tests use tempname() before nvim is spawned, instead use one of the following: 1. Set SYSTEM_NAME environment variable before calling the tests, it is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows') 2. Call uname -s 3. Assume windows
* Mark some functional tests as pending in WindowsRui Abreu Ferreira2016-08-26
|
* tests: don't ignore highlights in various testsBjörn Linse2016-08-14
|
* Restore ":browse oldfiles" behavior from VimJames McCoy2016-08-11
| | | | | | | | | | | | In 3b12bb225adda2aac40a55f7009cae05311b2a43, ":oldfiles" was taught to behave like Vim's ":browse oldfiles" if ":oldfiles!" was used. However, this conflates the use of ! for abandoning a modified buffer with choosing one file out of a list of oldfiles. Now that ":browse" is supported again, ":browse oldfiles" will allow the user to select an old file, while still complaining if that would cause a modified buffer to be abandoned. ":browse oldfiles!" will just abandon the buffer, as expected.
* Add test for :dropKillTheMule2016-07-01
| | | | Cf. https://github.com/neovim/neovim/pull/4995
* test: fix command_count_specBjörn Linse2016-06-23
| | | | The test hit wait_return if x or .x.swp exists in the project root directory.
* test: functional: Remove unnecessary use of clipboard registerJames McCoy2016-06-15
| | | | | | | | | menu_spec.lua yanks to the clipboard, but never pastes from it. This can leave a child xsel process waiting around for something to paste the content, causing the test process to hang. Since the test isn't explicitly trying to exercise the clipboard, simply use the default register.
* test: functional: Remove test_bkc_* files after testingJames McCoy2016-06-15
|
* functests: Check logs in lua codeZyX2016-06-10
| | | | | | 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.
* test/functional: cd_spec: Add tests for {getcwd,haslocaldir}(-1, -1)James McCoy2016-06-01
|
* test/functional: cd_spec: Add tests for using explicit argsJames McCoy2016-06-01
|
* test/functional: cd_spec: Use named keys for directories tableJames McCoy2016-06-01
| | | | | | The directories table contains the names of the expected directory names for varying scopes of the :cd tests. Using named indexes, instead of numbered, makes the test more readable.
* test/functional: Allow arbitrary arguments to cwd/lwd functionsJames McCoy2016-06-01
| | | | | | Build wcwd/tcwd and wlwd/tlwd on top of the reworked cwd/lwd functions. This will allow for easier testing of `getcwd()`/`haslocaldir()` in arbitrary windows and/or tab pages.
* test/functional: fix a dependency on the previous test suiteJohn Szakmeister2016-05-06
| | | | | | | While trying to debug an issue, I discovered that the tests for illegal arguments depended on the prior suite having run and started a session. Let's remove that unintentional dependency by starting our own session before each test.
* test/functional: prefix the cd command with silent to prevent hangingJohn Szakmeister2016-05-06
| | | | | In longer directory paths, the test can hang waiting for the user to hit enter to continue. Let's use the silent prefix to avoid this.
* Merge pull request #4654 from KillTheMule/testlintJustin M. Keyes2016-05-06
|\ | | | | Satisfy testlint.
| * Satisfy testlint.KillTheMule2016-04-28
| | | | | | | | For that, make luatest ignore the preload.lua files.
* | ex_getln: Do not crash with :append/:insert/:changeZyX2016-04-29
| | | | | | | | | | | | | | This change effectively disables history for lines inserted using this method. Not a big problem since it does not work for them in Vim in first place. Also solves a bug(?): ex_window() run while in :append mode opens search history in Vim for some reason. Now it opens empty cmdline window.
* | Remove old UNIX ifdef from buf_write()Rui Abreu Ferreira2016-04-28
|/ | | | | | | | | | | When backupcopy=auto buf_write assumes backupcopy=yes when the file is a hard/symbolic link. However this check was guarded by a UNIX ifdef. The check itself is portable and the guard can be removed. Added a couple tests to check the behaviour of bkc=auto and bkc=no with a symbolic link. Reported in #4525
* tcd: doc, error messagesJustin M. Keyes2016-04-21
|
* Implement tab-local working directory feature.HiPhish2016-04-20
| | | | | | | | | | | | | | | | | New ex commands: 'tcd', 'tchdir' Changed Vimscript functions: 'haslocaldir', 'getcwd' The ex-commands ':tcd' and ':tchdir' are the tab-local equivalents of ':lcd' and ':lchdir'. There are no new Vimscript functions introduced, instead the functions 'haslocaldir' and 'getcwd' take in optional arguments. See the documentation for details Since there is now different levels of local directory a simple boolean at source level is no longer sufficient; a new enumeration type is used for the scope-level from now on. The documentation has been accommodated for these new commands and functional tests have been written to test the feature.
* tests: fix indeterministic oldfiles! testBjörn Linse2016-04-14
|
* Update lua client to 0.0.1-24Thiago de Arruda2016-04-13
| | | | | The new version of the lua client uses libmpack as a backend, and some test scripts had to be updated to reflect that.
* Remove indeterminism in oldfiles_spec.luaThiago de Arruda2016-04-11
| | | | | If Nvim is in a "Press ENTER..." screen before the `get_vvar()` call, the test will hang.
* encoding: update testsBjörn Linse2016-01-02
|
* test/functional: clean up according to luacheck (part 2)Marco Hinz2015-11-23
|
* Workaround the unstable ordering of v:oldfiles in some more tests.John Szakmeister2015-11-16
| | | | | | Fixes #3676. Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
* Test: improve functional/ex_cmds/oldfiles_spec.luaMarco Hinz2015-11-11
| | | | | | | | | | - change approach for test 1: screen:expect() instead of assert() - use execute() instead of command() - 2 new tests that check none and wrong input for :oldfiles! Helped-by: @fwalch Helped-by: @tarruda Helper-by: @justinmk
* Add tests for :oldfilesMarco Hinz2015-11-10
|
* Add test/functional/ex_cmds/profile_spec.luaMarco Hinz2015-11-10
| | | | | | | This adds two new tests for: :profile dump :profile stop
* undo: Remove incorrect NONNULL_ALL attributeZyX2015-11-05
| | | Fixes #3605
* functests: Fix testsZyX2015-10-23
|
* functests: Do not forget about -i argumentZyX2015-10-23
| | | | Target: make all tests run with chmod -x ~/.config/nvim ~/.local/share/nvim.
* functests: Make one recover_spec test also use gdb or valgrindZyX2015-10-08
|
* Deprecate &viminfo and :[rw]v, add &shada and :[rw]shZyX2015-10-08
|
* Replace references to viminfo in various placesZyX2015-10-08
|
* test: menu_spec: avoid screen test.Justin M. Keyes2015-10-04
| | | | | Redraw can be flaky especially when remote commands happen during command-mode. Assert the state directly instead of using Screen.
* menu: support :emenu invoked by cmenu map.bambu2015-10-03
|