Commit Graph

792 Commits

Author SHA1 Message Date
ZyX
c129f6cfaf eval/decode: Accept \r as space character 2016-04-18 02:48:20 +03:00
ZyX
515fea1ef0 eval/decode: Reject even more numbers
Rejects leading zeroes and numbers like 1.e+5 (decimal dot with missing number 
with signed exponent).
2016-04-18 02:48:20 +03:00
ZyX
9c543f2e24 eval/decode: Reject more numbers, accept 1e5 2016-04-18 02:48:20 +03:00
ZyX
032ac502ff eval/decode: Do not loose high surrogates followed by high surrogates 2016-04-18 02:48:20 +03:00
ZyX
eb806c9620 eval/decode: Make sure that error messages do not cause overflow 2016-04-18 02:48:20 +03:00
ZyX
224d7df630 eval/decode: Make sure that blank input does not crash Neovim 2016-04-18 02:48:20 +03:00
ZyX
394830631f eval/decode: Make sure that U+00C3 is parsed correctly 2016-04-18 02:48:20 +03:00
ZyX
b725f6b428 functests: Make sure that json functions are tested with C messages 2016-04-18 02:48:20 +03:00
ZyX
4a29995fe7 eval/decode: Rename brackets in error messages
U+007D is officially RIGHT CURLY BRACKET.
U+005D is officially RIGHT SQUARE BRACKET.
2016-04-18 02:48:20 +03:00
ZyX
942e0b338c encode: Handle incomplete surrogates like \uSURR\uOTHR properly 2016-04-18 02:48:20 +03:00
ZyX
406562ac6d encode: Fail to dump NaN and infinity
Thanks to vim/vim#654
2016-04-18 02:48:20 +03:00
ZyX
2f67786796 eval: Rename json* functions to json_* 2016-04-18 02:48:20 +03:00
ZyX
f1ced96c28 api: Replace set_var(name, NIL) with del_var(name) 2016-04-18 02:47:13 +03:00
ZyX
f0bd4a1494 eval/encode: Fix invalid UTF-8 strings handling:
1. Do not allow reading past buffer end when creating error messages.
2. Fix surrogate pairs range, avoid magic constants.
2016-04-18 02:47:13 +03:00
ZyX
569e404622 eval/encode: Fix non-utf-8 &encoding handling, add tests 2016-04-18 02:46:34 +03:00
ZyX
d4106f6df3 shada: Make sure that NIL and EXT values can also be parsed back
Note: currently they are both *dumped*, but parsing them produces an error. This
is inappropriate: variables should either be skipped with error message when
dumping or should be read back properly.

It also appears that I did not have test for “has wrong variable value type”
error, so nothing got removed from errors_spec.
2016-04-18 02:46:34 +03:00
ZyX
0aa3e7b7ce eval: Port parts of 7.4.1267 that are not already present 2016-04-18 02:46:34 +03:00
ZyX
b7cb8f0597 eval: Make assert_true and assert_false accept v:true and v:false 2016-04-18 02:45:49 +03:00
ZyX
6167ce6df2 eval: Remove v:none
To get v:none back just rever this commit. This will not make json*() functions
compatible with Vim though.
2016-04-18 02:45:49 +03:00
ZyX
e303ea8a19 eval/decode: Add support for special maps
Special dictionaries representing map are created when encountering duplicate
key or when key is empty or contains NUL.

Also checks that values are separated by a comma/colon properly.
2016-04-18 02:45:49 +03:00
ZyX
2c378fdfaf eval/decode: Parse strings with NUL to special dictionaries 2016-04-18 02:45:49 +03:00
ZyX
5814e29cdb eval/decode: Fix surrogate pairs processing 2016-04-18 02:45:49 +03:00
ZyX
ea82270d30 eval/decode: Fail on control and invalid unicode characters 2016-04-18 02:45:49 +03:00
ZyX
cddd7d47c3 eval/decode: Make msgpackparse() function use new v: vars 2016-04-18 02:45:49 +03:00
ZyX
e213ba1506 eval: Add jsondecode() function 2016-04-18 02:45:49 +03:00
ZyX
f5c35ba109 functests/msgpack: Test dumping special nil and bool dicts 2016-04-18 02:44:03 +03:00
ZyX
6e5498c3e3 runtime/msgpack: Add support for special values 2016-04-18 02:44:03 +03:00
ZyX
d70a322c40 eval: Add special variables v:false, v:null, v:none 2016-04-18 02:44:03 +03:00
ZyX
18903bd9b8 eval: Add special variable type 2016-04-18 02:44:03 +03:00
ZyX
68e58444b4 eval: Add jsonencode() function
Ref #3471
2016-04-18 02:44:03 +03:00
ZyX
c3efad5398 functests(msgpack): Fix location of one of the tests 2016-04-18 02:44:03 +03:00
ZyX
f21cb425fb functests(msgpack): Fix test names 2016-04-18 02:44:03 +03:00
KillTheMule
e6e843ebc0 Make completion_spec.lua more robust
Having a tags file in the calling directory of make test would make this test
fail, so disable tag file completion for it. Disable all other options except the
current buffer, to, applying the principle of least surprise.
2016-04-16 22:40:43 +02:00
Justin M. Keyes
523ff9c55c test: defaults_spec.lua 2016-04-15 02:23:27 -04:00
Justin M. Keyes
54188cddde test: move server_spec.lua
Old layout was too granular, we do not need a server/ folder.
2016-04-15 02:23:27 -04:00
Björn Linse
01eafc0c17 tests: fix indeterministic oldfiles! test 2016-04-14 18:11:39 +02:00
Thiago de Arruda
c18d5917e3 Update lua client to 0.0.1-24
The new version of the lua client uses libmpack as a backend, and some test
scripts had to be updated to reflect that.
2016-04-13 09:21:32 -03:00
Thiago de Arruda
584b8eddb4 Mark cursor_spec.lua indeterministic test as pending 2016-04-11 23:07:52 -03:00
Thiago de Arruda
f5f11b9e2f Remove indeterminism in oldfiles_spec.lua
If Nvim is in a "Press ENTER..." screen before the `get_vvar()` call, the test
will hang.
2016-04-11 23:07:52 -03:00
Thiago de Arruda
704f3dd855 Synchronize shada reset helper with other functional tests 2016-04-11 23:07:52 -03:00
Justin M. Keyes
bf2c2b34cf Merge pull request #4357 from jbradaric/vim-7.4.1105
vim-patch:7.4.1105
2016-04-09 14:14:55 -04:00
Shougo Matsushita
d227c843bf complete: noinsert/noselect should not set 'modified'. #4509 2016-04-09 13:36:37 -04:00
Björn Linse
8eb8ebf905 tests: update tests to use [gs]et_lines instead of [gs]et_line_slice 2016-04-01 11:29:51 +02:00
Björn Linse
f3645e422f api/buffer: add tests for buffer_[gs]et_lines 2016-04-01 11:29:51 +02:00
Björn Linse
51c7818d42 api/buffer: introduce buffer_[gs]et_lines with new indexing convention.
-1 is index past the end, and -2 is the index of the last element.
This eliminates the need for include_start/include_end.

Allow the handling of out-of-bounds to be configurable.
2016-04-01 11:29:51 +02:00
James McCoy
7558f42f7d vim-patch:7.4.1654
Problem:    Crash when using expand('%:S') in a buffer without a name.
Solution:   Don't set a NUL. (James McCoy, closes vim/vim#714)

52c6eaffd4
2016-03-30 08:30:35 -04:00
James McCoy
62c0d99474 vim-patch:7.4.1652
Problem:    Old style test for fnamemodify().
Solution:   Turn it into a new style test.

610cc1b9b3
2016-03-30 08:30:35 -04:00
James McCoy
e4d1bf7177 vim-patch:7.4.1643
Problem:    Terminating file name has side effects.
Solution:   Restore the character. (mostly by James McCoy, closes vim/vim#713)

d4caf5c16a
2016-03-30 08:30:35 -04:00
James McCoy
5f0c76b243 vim-patch:7.4.1641
Problem:    Using unterminated string.
Solution:   Add NUL before calling vim_strsave_shellescape(). (James McCoy)

5ca84ce4aa
2016-03-30 08:30:35 -04:00
Justin M. Keyes
5730ad9376 Merge pull request #4461 from bfredl/pum_k_event
K_EVENT should not hide the popupmenu
2016-03-18 16:39:57 -04:00
Björn Linse
5aa0159f01 edit.c: K_EVENT should not hide the popupmenu
Nor should K_FOCUSGAINED and K_FOCUSLOST.
2016-03-17 13:26:51 +01:00
Justin M. Keyes
5a9d3be54c test: minor changes 2016-03-17 00:21:48 -04:00
Shougo Matsushita
77a7ca458b 'shortmess': Add "F" flag. #4446
Add "Don't give the file editing message" flag in shortmess option.

Add the UI tests by @fmoralesc
Fix the changes for Vim 7.4.1570
2016-03-17 00:07:38 -04:00
Justin M. Keyes
e7485ab1c9 Merge pull request #2877 from lucc/test88
test: Migrate legacy test 88.
2016-03-10 10:16:44 -05:00
Lucas Hoffmann
316d38d98c tests: Update migrated legacy test 88 for patch 7.4.639.
The patch was merged into master at d25a59f4.
2016-03-09 23:55:16 +01:00
Lucas Hoffmann
925c020a1b tests: Modernize legacy test 88. 2016-03-09 23:55:13 +01:00
Lucas Hoffmann
87c208a43f tests: Migrate legacy test 88. 2016-03-09 23:54:26 +01:00
Anmol Sethi
0b468fd0cf complete: disable folding when completing
Fixes vim/vim#643
2016-03-09 10:04:15 -05:00
Thiago de Arruda
96af115c71 Normalize nan/-nan in plugin/msgpack_spec.lua
-NaN doesn't exist in the IEEE 754 spec, it is a hardware-specific detail
abstracted away by luajit(and not by lua or nvim), so there's no need to test
it.  Normalize all tests that involve -nan so the suite will be compatible with
both Lua and Luajit.
2016-03-07 13:08:48 -03:00
Thiago de Arruda
34a1bc1a46 Remove goto statement in lua code.
`goto` is another luajit extension not compatible with 5.1.
2016-03-07 03:58:35 -03:00
Thiago de Arruda
c6ec148f2d Rewrite hexadecimal escape sequences as decimal in lua strings
The hexadecimal notation is a Luajit extension which is not compatible with Lua
5.1. While Lua 5.2 does support hexadecimal sequences, it is better to target
Lua 5.1 for maximum compatibility with Luajit(which has fully compatible with
5.1 API/ABI).
2016-03-07 03:58:35 -03:00
Thiago de Arruda
35d8d10a6a Remove dependency on ffi module 2016-03-07 03:58:29 -03:00
watiko
6d2ed7c0eb tests: Migrate legacy test tagcase 2016-03-06 00:32:58 +09:00
Marco Hinz
67eeb8a798 Tests: check error messages from set{qf,loc}list() 2016-03-02 15:09:39 +01:00
Marco Hinz
a528d56ba0 Tests: add autocmd_spec.lua 2016-03-02 12:37:50 +01:00
Marco Hinz
d9e631f1b5 Tests: clean up tabnew_spec.lua 2016-03-02 12:37:50 +01:00
watiko
29a1807de8 tests: Migrate legacy test sort 2016-03-02 17:32:24 +09:00
watiko
313810ccad vim-patch:7.4.1143
Problem:    Can't sort on floating point numbers.
Solution:   Add the "f" flag to ":sort".  (Alex Jakushev)  Also add the "f"
            flag to sort().

f7edf40448
2016-03-02 17:32:24 +09:00
watiko
d5904160d7 tests: Migrate legacy test searchpos 2016-03-02 16:41:09 +09:00
Justin M. Keyes
badf227e6f Merge pull request #4319 from watiko/vim-7.4.952
vim-patch:7.4.952
2016-03-02 01:31:45 -05:00
Marco Hinz
be7d6ba6c1 Trigger TabNew before TabEnter 2016-03-01 21:52:37 +01:00
Marco Hinz
6bfd88dec1 Tests: add function_spec.lua 2016-03-01 17:07:18 +01:00
Björn Linse
1dd986562f Merge pull request #4304 from bfredl/yank
Add v:event variable and TextYankPost autocommand
2016-02-29 16:09:28 +01:00
Björn Linse
2359f6f144 TextYankPost: add information to v:event and update tests 2016-02-29 16:07:50 +01:00
Björn Linse
7ab9ff88e6 eval: add v:event, which will contain data events want to propagate to their receivers.
Add helper functions dict_clear and dict_set_keys_readonly.
2016-02-29 16:06:41 +01:00
Marco Hinz
88da85a3cd Tests: fix according to lualint 2016-02-29 13:48:59 +01:00
Shougo Matsushita
f2ae5a9cc0 Add TextYankPost and TextDeletePost autocmds
Reviewed by @watiko

Ported from de53ab72c8
2016-02-29 13:21:59 +01:00
Justin M. Keyes
0c2ba7554f Merge pull request #3900 from ZyX-I/inf-nan-string
Make it possible to eval() all floating-point values dumped by string()
2016-02-28 11:48:54 -05:00
ZyX
0409cfded5 functests: Improve screen:expect error reporting 2016-02-28 08:15:52 +03:00
ZyX
a16d4a2b62 functests: Make test more robust 2016-02-28 08:12:55 +03:00
ZyX
712f057ed9 functests: Make sure that setting scrollback size works from TermOpen 2016-02-28 07:34:36 +03:00
ZyX
b32396170f main: Make using :edit term:// run TermOpen event
Ref #4306
2016-02-28 04:54:23 +03:00
Jurica Bradaric
11cf3680e4 vim-patch:7.4.1105
Problem:    When using slices there is a mixup of variable name and namespace.
Solution:   Recognize variables that can't be a namespace. (Hirohito Higashi)

9bbf63dbf8
2016-02-27 18:29:16 +01:00
Marco Hinz
b6170db1a1 Avoid internal errors with setloclist()
All syntastic users experienced this problem:

  E685: Internal error: get_tv_string_buf()

It's reproducable with:

  :call setloclist(0, [''])

So, not given optional arguments to setloclist() lead to some fields not
inizilied and the code took the wrong branches.
2016-02-26 18:52:17 +01:00
Lucas Hoffmann
1e7c6380fe tests: Migrate legacy test breakindent. 2016-02-25 17:15:09 +01:00
Marco Hinz
97324c96a4 Tests: add errorlist_spec.lua 2016-02-25 12:50:17 +01:00
Lucas Hoffmann
2ced866925 tests: Migrate legacy test 68. 2016-02-24 22:21:25 +01:00
Marco Hinz
9a3b7fa906 Tests: fix according to lualint 2016-02-24 01:42:38 +01:00
Björn Linse
06b9d2a6f2 bufhl: add tests for adding and clearing highlights 2016-02-23 21:29:01 +01:00
watiko
f0add77de5 vim-patch:7.4.952
Problem:    'lispwords' is tested in the old way.
Solution:   Make a new style test for 'lispwords'.

6cd1345307
2016-02-22 22:47:18 +09:00
Justin M. Keyes
99d4c8c29c keymap: Support <D-...> (super/command key).
Adds support for:
  - api:vim_input("<D-a>")
  - ":nnoremap <C-D-S-...>" and permutations thereof

UIs must capture the modifier and send it as "<D-...>" to vim_input().

Note: Before this commit, any arbitrary ":nnoremap <{foo}-{bar}>"
mapping could already be invoked with feedkeys("\<{foo}-{bar}>"). This
commit supports "D-" as a modifier that can be combined with "C-", "A-",
"S-" in any order.

For non-GUI (terminal) support, user must:
  :set <D-a>={CSI sequence}
then send the {CSI sequence} from their terminal. But this does not work
yet (regression #2204).

Closes #2190
2016-02-22 02:41:40 -05:00
Justin M. Keyes
95230ec702 Merge pull request #4267 from watiko/vim-7.4.932
vim-patch:7.4.{926,932,933}
2016-02-22 01:10:50 -05:00
Justin M. Keyes
73676ad37b Merge pull request #4262 from watiko/vim-7.4.893
vim-patch:7.4.{891,893,912}
2016-02-22 01:02:18 -05:00
Justin M. Keyes
6395dd64a4 Merge pull request #4167 from lucc/test11
tests: migrate legacy test 11
2016-02-21 23:49:36 -05:00
Justin M. Keyes
dd4b661dbd Merge pull request #4243 from lucc/test36
tests: Migrate legacy test 36.
2016-02-21 23:47:15 -05:00
Marco Hinz
6732f0193a Tests: check <abuf> from TermClose 2016-02-21 02:39:01 +01:00
Lucas Hoffmann
1b8caf3d75 test: charsearch: Fix error/typo in legacy test.
Error was reported upstream in vim/vim#650, fixed in 7.4.1366.
Typo was fixed upstream in 7.4.1041.
2016-02-20 10:52:02 -05:00
Lucas Hoffmann
76c9bd00d0 tests: Migrate legacy charsearch test. 2016-02-20 07:53:37 +01:00
Justin M. Keyes
00347ec781 Merge pull request #4240 from jbradaric/vim-7.4.888
vim-patch:7.4.888
2016-02-19 04:06:29 -05:00
Jurica Bradaric
560a346d57 vim-patch:7.4.844 #4228
Problem:    When '#' is in 'isident' the is# comparator doesn't work.
Solution:   Don't use vim_isIDc(). (Yasuhiro Matsumoto)

37a8de17d4
2016-02-17 03:59:58 -05:00
watiko
4f3ea0379e vim-patch:7.4.932
Problem:    test_utf8 has confusing dummy command.
Solution:   Use a real command instead of a colon.

8f08dab18d
2016-02-16 00:18:42 +09:00
watiko
3680332325 vim-patch:7.4.926
Problem:    Completing the longest match doesn't work properly with multi-byte
            characters.
Solution:   When using multi-byte characters use another way to find the
            longest match. (Hirohito Higashi)

4f8fa1633c
2016-02-16 00:15:52 +09:00
watiko
ade2298735 vim-patch:7.4.912
Problem:    Wrong indenting for C++ constructor.
Solution:   Recognize ::.  (Anhong)

e01f4f86ce
2016-02-15 21:08:22 +09:00
watiko
72d5a88af5 vim-patch:7.4.893
Problem:    C indenting is wrong below a "case (foo):" because it is
            recognized as a C++ base class construct.  Issue #38.
Solution:   Check for the case keyword.

d1b15dec4d
2016-02-15 19:13:15 +09:00
watiko
1eeadd7098 test: Fix lint error 2016-02-15 11:05:17 +01:00
watiko
9bd8fcde1e test: Add test cases to legacy test autocmd_option 2016-02-15 11:05:17 +01:00
watiko
2d5cba630c vim-patch:7.4.891
Problem:    Indentation of array initializer is wrong.
Solution:   Avoid that calling find_start_rawstring() changes the position
            returned by find_start_comment(), add a test. (Hirohito Higashi)

089af18d1f
2016-02-15 19:02:52 +09:00
Justin M. Keyes
baee9fe286 Merge pull request #4220 from watiko/vim-7.4.792
vim-patch:7.4.792
2016-02-15 03:55:23 -05:00
Lucas Hoffmann
109d53b7b9 test: Migrate legacy test 36.
The test was split into several blocks reusing the same input file.  As it is
complicated to send text in different encodings and with control characters
from the test suite to nvim and back the results are written to a temp file
and loaded into the test from there.
2016-02-15 09:25:49 +01:00
Lucas Hoffmann
291715286b test: Migrate legacy test 11.
Some parts of the test depend on gzip(1).  They are skipped if gzip is not
available.

Some `:write` and `:edit` commands produce messages and "hit enter" prompts
that had to be treated with an extra `feed('<C-L>')`.  In the original test
file this was not neccessary because it was `:source!`ed.
2016-02-15 09:09:16 +01:00
Justin M. Keyes
1e995ea2fd Merge #4140 'vim-patch:7.4.771'. 2016-02-15 01:48:30 -05:00
Justin M. Keyes
69234f4a76 test: search_mbyte_spec: minor cleanup
mbyte.vim, small.vim are not relevant to migrated legacy tests.
2016-02-15 01:47:43 -05:00
Justin M. Keyes
e0ca30553b Merge pull request #4166 from lucc/legacy/command_count
tests: Migrate legacy test command_count.
2016-02-15 01:10:15 -05:00
Justin M. Keyes
364d764889 Merge #2674 2016-02-13 15:22:12 -05:00
Justin M. Keyes
7567afbbe5 test: completion_spec: minor edits 2016-02-13 15:21:28 -05:00
Jun T
edbc97225d test: shada_spec: resolve symlink
If the build directory path has symlinks in it, 'make functionaltest'
fails at shada_spec.lua:177 because readme_fname has symlink but
nvim resolves the symlink when writing it into the shada file.
2016-02-12 00:03:39 +09:00
Justin M. Keyes
adb73b6025 Merge pull request #4204 from watiko/vim-7.4.915
vim-patch:7.4.{749,915}
2016-02-11 03:45:08 -05:00
watiko
51c3e0aa80 vim-patch:7.4.929
Problem:    "gv" after paste selects one character less if 'selection' is
            "exclusive".
Solution:   Increment the end position. (Christian Brabandt)

d29c6fea94
2016-02-11 15:13:30 +09:00
watiko
663e1ed158 vim-patch:7.4.743
Problem:    "p" in Visual mode causes an unexpected line split.
Solution:   Advance the cursor first. (Yukihiro Nakadaira)

c004bc2726
2016-02-11 15:13:30 +09:00
watiko
4a0e10fb2c vim-patch:7.4.734
Problem:    ml_get error when using "p" in a Visual selection in the last
            line.
Solution:   Change the behavior at the last line. (Yukihiro Nakadaira)

d009e86826
2016-02-11 15:13:30 +09:00
watiko
b137ebdd17 tests: Migrate legacy test match_conceal 2016-02-11 15:08:31 +09:00
Jurica Bradaric
f19e4dd1df vim-patch:7.4.834
Problem:    gettabvar() doesn't work after Vim start. (Szymon Wrozynski)
Solution:   Handle first window in tab still being NULL. (Christian Brabandt)

7e47d1ac6a
2016-02-09 20:21:26 +01:00
Jurica Bradaric
a9a25fda42 vim-patch:7.4.755
Problem:    It is not easy to count the number of characters.
Solution:   Add the skipcc argument to strchars(). (Hirohito Higashi, Ken
            Takata)

641e48c224
2016-02-09 01:36:29 -05:00
watiko
69e5427be1 vim-patch:7.4.915
Problem:    When removing from 'path' and then adding, a comma may go missing.
            (Malcolm Rowe)
Solution:   Fix the check for P_ONECOMMA. (closes #471)

174674743d
2016-02-09 14:44:53 +09:00
Justin M. Keyes
827e267800 Merge pull request #4175 from watiko/vim-7.4.700
vim-patch:7.4.700
2016-02-07 01:33:01 -05:00
Justin M. Keyes
d9cada146f Merge pull request #4157 from watiko/vim-7.4.694
vim-patch:7.4.{662,694}
2016-02-05 10:02:38 -05:00
watiko
3cf8ad6f48 tests: Add test case for legacy test 45 2016-02-05 14:09:03 +09:00
Lucas Hoffmann
86c5696c27 tests: Migrate legacy test 45. 2016-02-05 13:55:27 +09:00
Lucas Hoffmann
ad83cd82e1 tests: Simplify migrated legacy test. 2016-02-04 19:25:07 +01:00
Lucas Hoffmann
c1b0c45bee tests: Fix migrated legacy test.
The test involves argument and buffer numbers.  Therefore it was necessary to
use a custom testing session to ensure that the initial buffer corresponds to
an argument.
2016-02-04 19:23:47 +01:00
Lucas Hoffmann
153fe65c01 tests: Migrate legacy test command_count. 2016-02-04 19:20:59 +01:00
watiko
4cbe52b3a3 tests: Migrate legacy test textobjects 2016-02-03 21:56:22 +09:00
Justin M. Keyes
79a6983c0c ui: revert "gui_running" hack
Plugins (YCM, dispatch.vim) use gui_running to decide behavior; so do
some colorschemes. Up to now, nvim lied about gui_running for the
benefit of colorschemes and the detriment of all _other_ plugins that
check this condition. That's counterproductive: a user employs at most
_one_ colorscheme but may use many other plugins which expect the Vim
legacy semantics of gui_running.

Moreover, colorschemes usually don't _need_ to check gui_running: they
can instead set cterm{fg,bg} and gui{fg,bg} in the same :highlight call.

It is reasonable for users who want "true color" to modify their
colorscheme once (or request upstream to do so) in order to avoid
running into quirks in any other plugins.

Closes #2782
2016-02-03 01:21:59 -05:00
Marco Hinz
3d15cab29d Tests: fix according to lualint 2016-02-02 20:23:12 +01:00
ZyX
610b48c5b0 functests: Add string() function tests 2016-02-02 00:54:00 +03:00
ZyX
b2ea083eeb eval: Return different values when dividing by zero
Fixes #3263
2016-02-02 00:54:00 +03:00
ZyX
ad5cb87d7a eval: Add +tablineat feature 2016-02-01 21:40:46 +03:00
ZyX
3f314d40be functests: Improve tabline click tests 2016-02-01 21:40:46 +03:00
Jurica Bradaric
63a12e1e2d Remove unused variables from the test. 2016-02-01 08:54:13 +01:00
Jurica Bradaric
696adeb0f6 Use before_each instead of setup in the test. 2016-02-01 08:52:38 +01:00
Justin M. Keyes
be1d5a61be Merge pull request #4129 from jbradaric/vim-7.4.745
vim-patch:7.4.{745,746,747,748}
2016-02-01 02:49:27 -05:00
Jurica Bradaric
02cf813eff Add test files for patch 7.4.771.
vim-patch:efcabd6892ad89a4585fb77aa94c3b1802b784ab
2016-02-01 08:48:36 +01:00
Jurica Bradaric
59ef994f8f vim-patch:7.4.741 #4121
Problem:    When using += with ":set" a trailing comma is not recognized.
            (Issue 365)
Solution:   Don't add a second comma. Add a test. (partly by Christian
            Brabandt)

a7b7b1cef9
2016-02-01 02:28:51 -05:00
Justin M. Keyes
99067b7e56 Merge pull request #4113 from jbradaric/vim-7.4.709
vim-patch:7.4.709
2016-02-01 02:16:29 -05:00
watiko
fa924f4604 tests: Migrate legacy test increment. 2016-02-01 03:47:09 +09:00
watiko
a5f361e470 vim-patch:7.4.1027
Problem:    No support for binary numbers.
Solution:   Add "bin" to nrformats. (Jason Schulz)

887c1fea4a
2016-02-01 03:47:08 +09:00
watiko
7fc996abf6 vim-patch:7.0212
Add missing test case (test59's test 8-8).

8fd89f0fe7
0b23879827
2016-02-01 03:44:46 +09:00
Jurica Bradaric
f8ad215d25 vim-patch:7.4.745
Problem:    The entries added by matchaddpos() are returned by getmatches()
            but can't be set with setmatches(). (Lcd)
Solution:   Fix setmatches(). (Christian Brabandt)

0fce425772
2016-01-30 12:16:32 +01:00
Justin M. Keyes
8f22031708 Merge pull request #4117 from watiko/vim-7.4.963
Vim 7.4.{639,753,949,963}
2016-01-29 20:41:03 -05:00
solawing
fd14f64e26 tests: add always complete test 2016-01-29 22:03:30 +08:00
Justin M. Keyes
4c960c3d78 Merge #3077 'test_eval' 2016-01-29 00:23:53 -05:00
Justin M. Keyes
41f6a10a9b test: eval_spec.lua: minor cleanup 2016-01-29 00:20:47 -05:00
Justin M. Keyes
aa17b4b4bc vim-patch:7.4.1137
Problem:    Illegal memory access when using :copen and :cclose.
Solution:   Avoid that curbuf is invalid. (suggestion by Justin M. Keyes)
            Add a test.

62ef797496
2016-01-28 23:56:58 -05:00
Justin M. Keyes
73e83e8566 Merge pull request #4096 from justinmk/coverity125476
coverity/125476: RI: Null pointer dereference
2016-01-28 17:00:49 -05:00
Jurica Bradaric
a31f9161b0 vim-patch:7.4.709
Problem:    ":tabmove" does not work as documented.
Solution:   Make it work consistently.  Update documentation and add tests.
            (Hirohito Higashi)

40ce3a4e1f
2016-01-28 18:25:25 +01:00
watiko
db51ff10f4 vim-patch:7.4.963
Problem:    test_listlbr_utf8 sometimes fails.
Solution:   Don't use a literal multibyte character but <C-V>uXXXX. Do not
            dump the screen highlighting. (Christian Brabandt, closes #518)

1c57fe8b94
2016-01-28 20:52:41 +09:00
watiko
8721e1fe08 vim-patch:7.4.949
Problem:    When using 'colorcolumn' and there is a sign with a fullwidth
            character the highlighting is wrong. (Andrew Stewart)
Solution:   Only increment vcol when in the right state. (Christian Brabandt)

32a214e78d
2016-01-28 20:52:41 +09:00
watiko
8771e84db7 vim-patch:7.4.753
Problem:    Appending in Visual mode with 'linebreak' set does not work
            properly.  Also when 'selection' is "exclusive". (Ingo Karkat)
Solution:   Recalculate virtual columns. (Christian Brabandt)

74db34cc91
2016-01-28 20:52:41 +09:00
watiko
d25a59f4d0 vim-patch:7.4.639
Problem:    Combination of linebreak and conceal doesn't work well.
Solution:   Fix the display problems. (Christian Brabandt)

8fc6bc7126
2016-01-28 20:52:40 +09:00
oni-link
db77b7bc9e file_pat_to_reg_pat(): handle empty string. 2016-01-28 00:46:38 -05:00
Justin M. Keyes
894fcb778e glob2regpat(): handle empty string. 2016-01-27 22:19:50 -05:00
Lucas Hoffmann
e78fc534dd tests: Migrate recent patches of legacy eval test.
As the work of this migration did take quite some time, some changes where
made in master after this branch was started.  These are ported to the new
test file.
2016-01-27 12:54:45 +01:00
Lucas Hoffmann
4b13cbc76d tests: Comments and typos after review.
Helped-by: Justin M. Keyes <justinkz@gmail.com>
2016-01-27 12:52:13 +01:00
Lucas Hoffmann
fb3a6b925b tests: Resurrect unused part of legacy eval test.
The old test_eval.in file did a `:wq` on line 168.  The following 60 lines
where not used and there was no expected output for them in test_eval.ok.
This test code is now used in several test cases in the new test file.
2016-01-27 12:48:20 +01:00
Lucas Hoffmann
c13dc2b762 tests: Split converted eval test into it() blocks. 2016-01-27 12:43:53 +01:00
Lucas Hoffmann
8cfef01193 tests: Debug converted eval test. 2016-01-27 12:40:41 +01:00
Lucas Hoffmann
3571fdac6f tests: Migrate legacy eval test. 2016-01-27 12:37:56 +01:00
Justin M. Keyes
765d394f18 vim-patch:ac809999
ac80999985
2016-01-27 03:20:07 -05:00
Lucas Hoffmann
91a1680205 tests: Improve test 83 and add pending() call.
If nvim was compiled without `has("iconv")` this test is skipped.
2016-01-25 09:51:39 +01:00
Lucas Hoffmann
66f89ae321 tests: Migrate legacy test 83. 2016-01-25 09:39:59 +01:00
Justin Gassner
50c4c56967 vim-patch:dbcf19d
Add test files for patch 7.4.680.

dbcf19dc49
2016-01-23 15:33:31 +01:00
Justin M. Keyes
bcbcf235f6 Merge pull request #4012 from jbradaric/vim-7.4.729
vim-patch:7.4.729
2016-01-21 02:35:15 -05:00
Justin M. Keyes
8887ccffa6 Merge pull request #4049 from watiko/vim-7.4.616
vim-patch:7.4.616
2016-01-21 02:05:40 -05:00
Justin M. Keyes
542c79f20d test: printf_spec: fix missing setup
before_each(clear) is required to init the test harness for single-test
runs, and also to ensure a known environment for each test.
2016-01-21 01:34:56 -05:00
Justin M. Keyes
9eb6a44564 Merge #3916 "Add support for binary numbers". 2016-01-21 01:34:36 -05:00
watiko
5fa082fa85 tests: Migrate legacy test 39. 2016-01-21 14:05:02 +09:00
Björn Linse
4618307a6c job control: add tests for 'jobpid' and 'detach' 2016-01-20 11:09:29 +01:00
Jurica Bradaric
a118abca77 Add eol to listchars for mouse specification tests
This is consistent with VIM behavior. When showing a visual selection,
VIM only extends it past the last character if eol is in listchars (even
if nolist is set).
2016-01-19 08:47:49 +01:00
Jason Schulz
7ad3f077dc Add support for binary numbers 2016-01-15 18:21:06 -08:00
watiko
6f88dca92d tests: Migrate legacy test cdo. 2016-01-15 23:50:04 +09:00
watiko
b1b8759fc3 vim-patch:7.4.614
Problem:    There is no test for what patch 7.4.601 fixes.
Solution:   Add a test. (Christian Brabandt)

d7ce7a9ad2
2016-01-14 12:22:45 +09:00
Justin M. Keyes
8eeda7169a terminal: less babysitting of mapped_ctrl_c
process_interrupts() checks get_real_state() so we can avoid some
housekeeping of mapped_ctrl_c in terminal-mode.
2016-01-13 02:40:57 -05:00
Shougo Matsushita
3dfbeabf35 vim-patch:7.4.569/573
vim-patch:7.4.569
vim-patch:7.4.573
Helped-by: @glts https://github.com/neovim/neovim/pull/2621

Problem:    Having CTRL-C interrupt or not does not check the mode of the
            mapping. (Ingo Karkat)
Solution:   Use a bitmask with the map mode. (Christian Brabandt)

651863c94a

Problem:    Mapping CTRL-C in Visual mode doesn't work. (Ingo Karkat)
Solution:   Call get_real_state() instead of using State directly.

5000869712
2016-01-13 01:56:36 -05:00
Justin M. Keyes
317d5ca7b0 input: Do not set high-bit; preserve ALT modifier.
Background: Vim internally prefers to represent ALT/META chords as
single-byte keys, by setting the high bit of the key byte.
extract_modifiers() _discards_ the meta/alt modifier, but we need it for
libvterm and libtermkey.

Closes #2440
Closes #3727
Closes #2017
References #2277
References #2254

https://github.com/neovim/neovim/issues/2017#issuecomment-140423557
> We [not libtermkey] are setting the high bit for some reason

https://github.com/neovim/neovim/issues/176#issuecomment-77834715
> libvtermkey requires the leading esc to parse alt/meta

https://github.com/neovim/neovim/pull/3246#issuecomment-136328450
> A program could do better than the current logic on some terminals, by
> asking for pure 8bit mode (S8C1T) and then immediately querying the
> mode again. If the result comes back as an 8bit single-byte CSI, then
> it can presume the mode setting was successful, and now the ESC prefix
> byte won't be seen in multibyte sequences; only as an Alt- prefix or
> a real Escape key. On such a terminal, it could therefore avoid
> needing to use that waiting timeout.
2016-01-11 00:29:58 -05:00
Justin M. Keyes
c6e481cba5 portability: use portable format specifier 2016-01-10 01:34:49 -05:00
watiko
59b04d856b tests: Make helper.source() return tempname. 2016-01-10 10:44:57 +09:00
watiko
feed81f45f tests: Fix OSX's tempname issue. 2016-01-10 10:44:57 +09:00
watiko
d37dc0b314 tests: Rename 100_undo_level to 100_lispwords. 2016-01-10 10:44:57 +09:00
watiko
9c5ab23ef2 tests: Migrate legacy test undolevels. 2016-01-10 10:44:57 +09:00
watiko
d8e07deff6 tests: Migrate legacy test assert. 2016-01-10 10:44:57 +09:00
ZyX
c6f6033482 eval: Do not use msgpack#string for error messages 2016-01-07 00:54:58 +03:00
ZyX
efaf76e623 functests: Update tests 2016-01-07 00:54:57 +03:00
Björn Linse
70f6e2ce52 encoding: update tests 2016-01-02 23:22:13 +01:00
Justin M. Keyes
22a928aeac test: change CI_TARGET reference to CI
Travis defines[1] $CI for its builds, whereas $CI_TARGET is
a Neovim-specific env var from 6483a198e4
that lost prominence in d2eb4a9346.

[1] https://docs.travis-ci.com/user/environment-variables/
2016-01-01 23:58:42 -05:00
Rui Abreu Ferreira
a48508de0d test/functional: Fix api/vim_spec.lua.
On Windows the default file format is DOS i.e. newlines are \r\n
instead of \n.
2015-12-31 23:28:55 -05:00
Rui Abreu Ferreira
091e885d44 Windows: fix serverstart functional test 2015-12-31 16:07:43 -05:00
Justin M. Keyes
d8a2007d47 Merge pull request #3869 from oni-link/fix.issue.3844
helpers.c: Handle msgpack str/bin objects with length 0 correctly
2015-12-30 01:01:23 -05:00
oni-link
8373aaf44e helpers.c: Handle msgpack str/bin objects with length 0 correctly
When converting a msgpack object to a String object, strings (and byte
arrays) with length 0 are handled as errors. This is fixed by
always using the msgpack data pointer as a valid pointer. For a NULL
pointer there is nothing to copy.

Test by @snoe

Fixes #3844
2015-12-21 00:23:53 +01:00
Marco Hinz
376b973a0a Tests: fix according to lualint 2015-12-20 22:41:40 +01:00
Justin M. Keyes
e123675bcc Merge pull request #3722 from ZyX-I/fix-3721
shada: Continue dumping when variables failed to dump
2015-12-18 11:55:15 -05:00