Commit Graph
173 Commits
Author SHA1 Message Date
James McCoy dc513f7618 getcmdline_prompt: Temporarily disable msg_silent so prompt is displayed
vim-patch:7.4.1636
Closes #7378
2017-10-14 14:32:27 -04:00
ZyX efb03903eb functests: Remove wait() from input_spec 2017-08-06 14:43:46 +03:00
ZyX 1011462b40 Revert "functests: Replace wait() with nvim_async"
This reverts commit e129607988.

Tests stopped working in CI.
2017-07-27 18:49:13 +03:00
ZyX e129607988 functests: Replace wait() with nvim_async 2017-07-26 22:04:39 +03:00
ZyX 1ba21b4a31 functests: Remove unneeded wait()s 2017-07-26 13:02:45 +03:00
ZyX 69719e658c Merge branch 'master' into colored-cmdline 2017-07-15 18:56:45 +03:00
Nikolai Aleksandrovich Pavlov 702c94aacf mbyte: Fix crash when using multibyte chars in maparg() return (#6986)
This is a refactoring typo from #6947.

Fixes #6985

Combined with #6947 where typo was made it also fixes vim/vim#1827 which was
present in Neovim.
2017-07-09 10:40:46 +02:00
KunMing Xie 57d691e81a test: handle single-char hostname (#6939) 2017-07-01 18:48:17 +02:00
ZyX 95fe5614a0 functests: Add missing wait() 2017-06-27 01:34:54 +03:00
ZyX 407abb3a6c eval,ex_getln: Add support for coloring input() prompts 2017-06-27 01:34:54 +03:00
ZyX e57d4eef88 functests: Move function_spec to eval 2017-06-20 18:17:47 +03:00
James McCoy bf4de3f6f7 functests/msgpack: Correct representation of literal INT64_MIN
In order to generate INT64_MIN from literal values, it's necessary to
use "-0x7fffffffffffffff - 1".  Using "-0x8000000000000000" causes the
value to get clamped to INT64_MAX and then negated.
2017-06-06 21:38:31 -04:00
James McCoy d69286c065 functests/msgpack: Use assert_equal() for more informative errors 2017-06-06 21:38:30 -04:00
James McCoy 9cc185dc6d Merge pull request #6680 from mhinz/listen/localhost
Use uv_getaddrinfo() for servers
2017-05-28 13:26:06 +00:00
James McCoy 6c135b89ee eval: serverstart: Return finalized address to user
In the process of setting up the socket watcher, the address may be
changed (e.g., adding the OS-selected port).
2017-05-28 07:14:49 -04:00
TJ DeVries 45626de63f get_keymap API (#6236)
* Add api function get keymap

nvim_get_keymap(mode)
nvim_buf_get_keymap(buffer, mode)
2017-05-25 12:41:53 +02:00
Marco Hinz afa781f420 Server tests: endpoint parsing in serverstart() 2017-05-22 01:05:40 +02:00
Marco Hinz f913ba6e06 Server tests: use helpers.command() 2017-05-22 01:05:40 +02:00
Justin M. Keyes 17531ed082 Merge #6480 from ZyX-I/colored-cmdline'/input-dict 2017-05-13 21:17:33 +02:00
ZyX a59ddde721 functests: Reword regression test headers 2017-05-13 17:07:31 +03:00
ZyX 9906db985d functests: Remove “correctly” from non-regression tests 2017-05-13 17:04:54 +03:00
ZyX b6d73fb740 functests: Get rid of last redraws due to the “line above” issue 2017-05-11 12:15:41 +03:00
ZyX 33ca9f711e functests: Remove outdated comments 2017-05-10 23:19:49 +03:00
ZyX 88d4a260e1 functests: Remove some redraw calls 2017-05-10 23:14:23 +03:00
ZyX 4c4f741aec functests: Remove all wait()s 2017-05-10 23:05:58 +03:00
Björn Linse e82cb5de4a api: add metadata for ui events 2017-05-10 17:36:31 +02:00
ZyX 5e6f7e1d55 eval: Alter E5050 error message, test that 2017-05-10 15:52:49 +03:00
ZyX f4d5d5250a eval: Refactor get_user_input to support dictionary 2017-05-10 15:52:48 +03:00
Rui Abreu Ferreira d31d177a0c win: default shellxescape, shellxquote to empty
Calling cmd.exe in Windows follows a very different pattern from Vim.
The primary difference is that Vim does a nested call to cmd.exe, e.g.
the following call in Vim

    system('echo a 2>&1')

spawns the following processes

    "C:\Program Files (x86)\Vim\vim80\vimrun" -s C:\Windows\system32\cmd.exe /c (echo a 2^>^&1
        ^>C:\Users\dummy\AppData\Local\Temp\VIoC169.tmp 2^>^&1)
    C:\Windows\system32\cmd.exe /c C:\Windows\system32\cmd.exe /c (echo a 2^>^&1
        ^>C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2^>^&1)
    C:\Windows\system32\cmd.exe  /c (echo a 2>&1
        >C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2>&1)

The escaping with ^ is needed because cmd.exe calls itself and needs to
preserve the special metacharacters for the last call. However in nvim
no nested call is made, system('') spawns a single cmd.exe process.
Setting shellxescape to "" disables escaping with ^.

The previous default for shellxquote=( wrapped any command in
parenthesis, in Vim this is more meaningful due to the use of tempfiles
to store the output and redirection (also see &shellquote). There is
a slight benefit in having the default be empty because some expressions
that run in console will not run within parens e.g. due to unbalanced
double quotes

    system('echo "a b')
2017-04-12 02:10:34 +02:00
Rui Abreu Ferreira f3cc843755 win: libuv_process_spawn(): special-case cmd.exe
Disable CommandLineToArgvW-standard quoting for cmd.exe.

libuv assumes spawned processes follow the convention expected by
CommandLineToArgvW(). But cmd.exe is non-conformant, so for cmd.exe:
- With system([]), the caller has full control (and responsibility) to
  quote arguments correctly.
- With system(''), shell* options are used.

libuv quoting is disabled if argv[0] is:
- cmd.exe
- cmd
- $COMSPEC resolving to a path with filename cmd.exe

Closes #6329
References #6387
2017-04-12 02:10:34 +02:00
Rui Abreu Ferreira 799443c994 win/test: Enable more system() tests 2017-04-12 02:10:33 +02:00
ZyX 69d1003bf7 functests: Fix some tests which are failing locally for unrelated reasons 2017-04-09 03:24:14 +03: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 13352c00f1 win: os_get_hostname() #5416 (#6413) 2017-04-07 19:46:33 +02:00
ZyX 97a7f4745d eval: Add s flag, use p_fs by default, error out on unknown flag 2017-04-03 02:11:27 +03:00
ZyX 46efe14473 functests: Try sleeping a bit more 2017-03-29 10:08:46 +03:00
ZyX fa852e7cdc eval: Fix extend() behaviour with NULL lists and dictionaries
Ref #4615
Ref vim/vim#768
2017-03-29 10:08:45 +03:00
ZyX 38dd81c136 eval/typval: Fix SEGV in test_alot.vim test 2017-03-29 10:08:45 +03:00
ZyX 1e3e302dc2 eval: Move part of dictwatcher* functions to eval/typval 2017-03-29 10:08:44 +03:00
ZyX 5239616297 functests: Fix buf_functions test on Windows 2017-03-29 10:08:44 +03:00
ZyX b3672ae2fc eval/typval: Add tv_list_equal() tests, compare NULL lists equal 2017-03-29 10:08:06 +03:00
ZyX 7ceebacb3f eval/typval,tests: Fix extending list with itself, add tests
Adds unit test for tv_list_extend and regression test for extend() VimL
function.
2017-03-29 10:08:06 +03:00
ZyX f80a00469f eval/typval: Make tv_list_concat handle NULL lists correctly
Fixes some FIXMEs in eval/null_spec.lua.
2017-03-29 10:08:06 +03:00
ZyX 82e6cac5f9 functests: Add null_spec.lua from #4615
For now it is full of FIXMEs and tests for incorrect behaviour. Sorted out to
have FIXMEs in one place, commented crashing tests in other and correctly
working tests in the third one.
2017-03-29 10:08:06 +03:00
ZyX 86fc4580b8 eval: Fix max_min functions
Found two bugs:

1. Multiple unneeded error messages, vim/vim#1039.
2. Unformatted error string, vim/vim#1040.
2017-03-29 10:08:06 +03:00
ZyX c8e63a8db8 eval: Move remaining get_tv_string* functions to eval/typval.c 2017-03-29 10:08:05 +03:00
ZyX 7ee5cc7429 eval: Move get_tv_lnum and get_tv_float to eval/typval.h
Additionally

- Rename former tv_get_float to tv_get_float_chk due to name conflict (former
  get_tv_float is better suited for being tv_get_float).
- Add E907 error to get_tv_float() and test that it is being raised when
  appropriate.
2017-03-29 10:08:05 +03:00
ZyX 54bd2e8b73 eval: Make setmatches() return -1 in case of some failures 2017-03-29 10:07:43 +03:00
ZyX e18a578308 *: Move some dictionary functions to typval.h and use char*
Also fixes buffer reusage in setmatches() and complete().
2017-03-29 10:07:42 +03:00
ZyX 50a48f2a0e functests: Add tests for some *buf* functions 2017-03-29 10:05:06 +03:00