Commit Graph

310 Commits

Author SHA1 Message Date
Justin M. Keyes
698482ec3e test: python: report pending() if python{2,3} is missing 2015-08-09 22:33:28 -04:00
Marco Hinz
990c0350ab vim-patch:7.4.773 #3066
Problem:  'langmap' is used in command-line mode when checking for mappings.
Solution: Do not use 'langmap' in command-line mode. (Larry Velazquez)

Original patch:
  https://code.google.com/p/vim/source/detail?r=5b1eefbf9a532f32a66fa13abbd671488aaafd5c
2015-08-09 21:12:11 -04:00
Björn Linse
d4ebbaa91a clipboard: support clipboard=unnamedplus,unnamed 2015-08-07 13:06:13 +02:00
Justin M. Keyes
5a19585865 test: cover msgpackparse() regression 2015-08-05 19:08:06 -04:00
Justin M. Keyes
9f350e615c Merge pull request #3034 from ZyX-I/msgpack-eval
msgpack viml functions for dump/restore
2015-08-03 00:24:10 -04:00
ZyX
030f360312 functests: Use eval subdirectory in place of viml 2015-08-02 22:19:58 +03:00
ZyX
7fbefd585e eval: Remove most of msgpack* functions limitations 2015-08-02 19:32:41 +03:00
ZyX
5a7135fa1c eval: Add msgpackparse and msgpackdump functions 2015-08-02 19:32:41 +03:00
Justin M. Keyes
efa059c5a4 test: call scandir_next_with_dots() more than once
Also cosmetic reduction.
2015-08-01 23:33:54 -04:00
Felipe Morales
ea551044ea Add the . and .. entries to glob()
os_scandir() and os_scandir_next() skip over those, because of the
unverlying libuv funcitons behaviour.

Fixes #2954
2015-08-01 23:16:17 -04:00
Omar Sandoval
f79025b9de tui: Use underline cursor in Replace mode
This is a port of my original contribution to Vim, added in 7.4.687
(https://github.com/vim/vim/commit/v7-4-687). The TUI code has been
heavily refactored (see esp. 25ceadab37),
so this required some translation, but the logic is the same.
2015-07-26 23:45:41 -04:00
Omar Sandoval
fa48fc667a api: Simplify UI API on mode change
Currently, there are two functions in the UI API that are called when
the mode changes: insert_mode() and normal_mode(). These can be folded
into a single mode_change() entrypoint which can do whatever it wants
based on the mode it is passed, limited to INSERT and NORMAL for now.
2015-07-26 23:38:35 -04:00
Björn Linse
7a6bf3f418 Add ui test for default title (with/without filename) #3091 2015-07-23 22:35:42 +02:00
Robin Allen
5ad619a847 menu: Fix :emenu mode detection #2992
A menu item can have separate bindings for each Vim mode.

:emenu checks to see which binding it should execute. But, it assumes
it can only be called from Normal mode, so its mode detection is based
on some guesswork. For instance, it detects if you've just used C-O
and, if so, uses the Insert mode binding.

Now that :emenu can be called from any mode (via vim_command), this
commit has it check the actual mode we're in, and simply use the
binding for that mode if we aren't in Normal mode.
2015-07-22 10:13:49 -04:00
Lucas Hoffmann
6571c84d54 tests: Migrate legacy test 80. #2989
The test is also split in several blocks and heavily modernized.  This was
done to prevent the following quoting and escaping problems during migration:
- the vim command `put =...` treats double quotes as the start of a comment so
  they have to be escaped with a backslash
- when inserting control characters on the command line they have to be
  escaped with <C-V>

The parts one and two of the test are functional identical so they are wrapped
in a local function. The only difference was which letters where used to test
the same feature.

Part six did test a flag in 'cpoptions' that has been removed in neovim.  It
has therefore been removed as well.

Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
2015-07-21 19:56:15 -04:00
Björn Linse
8047570b70 clipboard: add tests for error fallback and middleclick paste 2015-07-20 20:24:28 -04:00
Marco Hinz
2b2cea38a9 Test: fix functional/ex_cmds/recover_spec.lua
os.remove() wasn't removing the temporary swap directory which leads to
problems when the test is run a second time.

That's also the reason why the CI never caught this.

os.remove() got replaced by helpers.rmdir().
2015-07-20 22:19:16 +02:00
Marco Hinz
0f34b256aa Test: add new helper function: rmdir()
- lfs.rmdir() only removes empty directories

- os.remove() supercedes lfs.rmdir(); removes files and empty directories

- helpers.rmdir() first removes all files within a directory, then the
  directory itself
2015-07-20 22:19:07 +02:00
Sebastian Witte
fcb79ffc40 Implement API function to call functions #2979
Remove static modifier from func_call
Move MAX_FUNC_ARGS definnition from eval.c to eval.h
2015-07-19 17:18:31 +02:00
Lucas Hoffmann
42d38b363c tests: Split migrated test 57. 2015-07-19 04:06:45 +02:00
Lucas Hoffmann
1b2eb306f7 tests: Migrate legacy test 57. 2015-07-19 04:06:45 +02:00
Marco Hinz
9d876eb037 Test: synIDattr(): true color awareness 2015-07-18 16:55:25 +02:00
Thiago de Arruda
9e42ef4e13 test: lower sleep value in job test
Since sleep is a grandchild of nvim, it is not killed after the test ends.
Using a low sleep value allows it to exit automatically after a small interval.
2015-07-16 23:10:01 -03:00
Thiago de Arruda
e85c9966b8 test: Increase determinism in screen_basic_spec tests 2015-07-16 23:08:09 -03:00
Lucas Hoffmann
d88c93acf3 tests: Style improvements and Makefile fix for migrated test 60. #2975 2015-07-16 20:31:20 -04:00
Justin M. Keyes
7b56a8230f test: buffer_spec: fix set_line invocation
- pcall result was always false because of wrong arity
- also re-arrange tests into it() blocks
2015-07-11 22:33:05 -04:00
Nick Hynes
c2f14bb89c test: api: exercise out-of-bounds line slicing 2015-07-11 18:20:35 -04:00
Lucas Hoffmann
c51d0e49a9 tests: Modernize migrated legacy test 62.
- use eval() and eq() in many places instead of writing to the buffer
- remove has('autocmd') checks and use corresponding code unconditionally as
  neovim always has the autocmd feature
- split the test into several it() blocks

Helped-By: Scott Prager <splinterofchaos@gmail.com>
Helped-By: Michael Reed <m.reed@mykolab.com>
2015-07-11 00:55:16 +02:00
Lucas Hoffmann
98c022c329 tests: Migrate legacy test 62. 2015-07-11 00:47:49 +02:00
Michael Reed
1b78ad1c4d Merge pull request #2932 from lucc/helpers/write_file
[RDY] tests: Add write_file helper function

Reviewed-by: Florian Walch <florian@fwalch.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
2015-07-06 04:07:23 -04:00
Björn Linse
e9c9d44f65 clipboard: don't overwrite before pasting in visual mode. #2945
This occured when clipboard=unnamedplus and doing "+p in visual mode.
Fixes #2942.
2015-07-04 18:17:30 +02:00
Lucas Hoffmann
8f4e3a68a8 tests: Use new write_file() function in tests. 2015-06-30 18:06:06 +02:00
Lucas Hoffmann
652ee0348c tests: Use write_file() in source(). 2015-06-30 18:06:06 +02:00
Lucas Hoffmann
f0850775bf tests: Add helpers.write_file() to write short files. 2015-06-30 18:06:06 +02:00
Nick Hynes
105b8f1070 rplugin: allow users to register hosts #2896 2015-06-25 19:01:38 -04:00
Justin M. Keyes
f78bf64771 api: vim_set_var() should return the old value #2899
Closes #2816
2015-06-25 01:26:17 -04:00
Justin M. Keyes
20a57c497b tests: 061_undo_tree_spec: minor edits 2015-06-22 22:56:16 -04:00
Lucas Hoffmann
c411fb6cda tests: Repeat a flaky part of the migrated test 61.
This is the part of the test that relies on wall clock time and sometimes
fails if the system is under load.  The test is repeated up to three times
before a failure is reported to the user.
2015-06-22 17:05:10 +02:00
Lucas Hoffmann
1c7372361f tests: Split test 61 into several it() blocks. 2015-06-22 12:15:51 +02:00
Lucas Hoffmann
2ce3656754 tests: Fix an further simplify migrated test 61.
:undojoin can only be used inside scripts and command chains.  So it has to be
tested inside an explicit `source()` call.

Also add a new test case for the different behavior when sourceing normal mode
commands from a script or inserting them interactively.
2015-06-22 12:08:24 +02:00
Lucas Hoffmann
981dd23f8d tests: Don't set ul in migrated test 61.
The legacy test uses `set ul=100` to break the changes into blocks that can be
undone separately.  This is needed because the legacy test is sourced from a
file and changes would be grouped into on undo block by default.  The lua test
suite does not have this restriction.

Also add a new test case to test this effect of using `set ul=100` in a
sourced script.
2015-06-22 12:01:07 +02:00
Lucas Hoffmann
8c999a9d6c tests: Migrate legacy test 61.
This test is real time based as it also tests the `:earlier` and `:later`
commands with time arguments (using `:sleep`).  This can sometimes case the
test to fail on systems that are under heavy load or where the time interval
between creating the expected buffer state and the `:earlier` or `:later`
command that tries to jump to it changes.

To be system independent we use nvim's `:sleep` command and `wait()` for it in
the test suit.

The legacy vim test writes to test.out a lot with `:.w >>test.out`.  This
does currently not work in the lua test suite so the test is modernized to use
busted's assertions instead of the output file.

This test was treated special in the legacy Makefile but after the conversion
the related code can be removed.
2015-06-22 11:58:43 +02:00
Lucas Hoffmann
7e7d78b2a6 doc: Fix some typos and trailing whitespace. #2875 2015-06-21 00:34:51 -04:00
Justin M. Keyes
9ebb5c681b defaults: enable 'hlsearch' by default. #2859
Also update the documentation regarding the option.

Re: https://github.com/neovim/neovim/issues/2676
2015-06-20 16:40:03 -04:00
Felipe Morales
8e3f67f2a0 defaults: enable 'autoindent' #2857
Re: https://github.com/neovim/neovim/issues/2676
2015-06-20 14:02:56 -04:00
Felipe Morales
41c76d9444 defaults: enable 'smarttab' by default. #2855 2015-06-20 13:45:47 -04:00
Shougo Matsushita
8b200f904f completion: Initialize v:completed_item #2839
v:completed_item should always be a dict (not empty string), even before
the first completion.
2015-06-20 11:53:13 -04:00
Lucas Hoffmann
c2065a183f tests: Modernize migrated argument_count test. 2015-06-16 01:36:17 -04:00
Lucas Hoffmann
55806fbe39 tests: Migrate legacy test argument_count. 2015-06-16 01:36:17 -04:00
Lucas Hoffmann
88b76ec146 tests: Modernize migrated legacy test argument_0count. 2015-06-16 01:23:23 -04:00