Commit Graph

148 Commits

Author SHA1 Message Date
ZyX
a85163a5d2 scripts: Add filter argument to shadacat.py 2015-10-23 14:47:59 +03:00
ZyX
1e06792099 scripts: Improve shadacat to work with unknown items 2015-10-08 22:00:29 +03:00
ZyX
38b8eb3561 scripts: Also print entry offset in shadacat.py 2015-10-08 22:00:16 +03:00
ZyX
200e62efeb shada: Add support for dumping/restoring bufs changes and win jumps 2015-10-08 21:59:53 +03:00
ZyX
244dbe3a77 viminfo: First version of ShaDa file dumping
What works:

1. ShaDa file dumping: header, registers, jump list, history, search patterns,
   substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.

Most was not tested.

TODO:

1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
   reference).
2015-10-08 21:59:51 +03:00
Justin M. Keyes
a7ec1a5f50 vim-patch.sh: best-effort for older git. 2015-08-27 23:44:48 -04:00
Justin Gassner
aafbe5d28a vim-patch.sh: get all untagged patches #3250 2015-08-27 23:22:56 -04:00
Justin M. Keyes
b4d29fe067 vim-patch.sh: update for git 2015-08-26 03:02:13 -04:00
John Whitley
4d39db355b vim-patch.sh: update for Vim's hg => git migration 2015-08-26 02:15:24 -04:00
Rui Abreu Ferreira
5066128d48 Windows: Accept CRLF in msgpack-gen.lua grammar #3226
- MSVC generates output using Windows newlines (\r\n) instead of (\n).
2015-08-24 04:35:44 -04:00
Justin M. Keyes
2647677618 Merge pull request #2159 from ZyX-I/auto-unicode
Generate unicode tables with script
2015-08-19 23:41:12 -04:00
Thiago de Arruda
ccdeb91e12 msgpack: Replace FUNC_ATTR_DEFERRED by FUNC_ATTR_ASYNC
API functions exposed via msgpack-rpc now fall into two categories:

- async functions, which are executed as soon as the request is parsed
- sync functions, which are invoked in nvim main loop when processing the
  `K_EVENT special key

Only a few functions which can be safely executed in any context are marked as
async.
2015-08-13 07:41:04 -03:00
Florian Walch
95a4dc6487 vim-patch.sh: Add --review option to compare PR and original diffs. #3083
Helped-by: Michael Reed <m.reed@mykolab.com>
2015-08-03 21:36:33 +02:00
ZyX
4d2807e128 documentation: Document table meanings in comment to genunicodetables 2015-07-26 22:59:46 +03:00
ZyX
8f9b81059a Create script that downloads and commits UNIDATA files 2015-07-26 22:59:46 +03:00
ZyX
c31b3339ff Generate unicode tables with script when building 2015-07-26 22:59:46 +03:00
ZyX
6f35bcfb07 syntax: Exclude deprecated options
Excluded options (compatible, edcompatible and ttyfast) are listed in 
vimOnlyOption group.
2015-07-26 21:39:19 +03:00
ZyX
853ba34103 syntax: List NeoVim-specific autocmd events
Note: list was copied from master (7a6bf3f418). 
I did not add more events there.
2015-07-26 21:28:32 +03:00
ZyX
478ee680dc scripts: Add script which is able to generate part of vim.vim file 2015-07-26 12:58:01 +03:00
ZyX
7f6c14ed54 options: Move option definitions to options.lua 2015-07-26 12:58:00 +03:00
ZyX
8ed2dbf6e2 fileio: Move event definitions to the generator script 2015-07-26 12:39:01 +03:00
oni-link
34b5cee533 Fix compiling with gcc 5. #2566
Pattern matching failed, because the preprocessor added additional
linemarkers around type Bool.
2015-05-04 23:23:06 -04:00
Justin M. Keyes
28ad7b5026 scripts/legacy2luatest.pl: remove modeline #2536
Several legacy tests have "vim: set ft=vim" modelines which causes the
new lua file to be opened with filetype=vim.
2015-05-02 20:40:08 -04:00
Felipe Morales
86330fdd3f vim-patch:7.4.530-531
Specify different kinds of counts for commands.
Updated ex commands generator scripts.

Includes fixes to comments from patch 7.4.531

Original message:

Problem:    Many commands take a count or range that is not using line
            numbers.
Solution:   For each command specify what kind of count it uses.  For
            windows, buffers and arguments have "$" and "." have a
relevant
            meaning. (Marcin Szamotulski)

https://code.google.com/p/vim/source/detail?r=v7-4-530
https://code.google.com/p/vim/source/detail?r=v7-4-531

Add legacy tests for 7.4.530

https://code.google.com/p/vim/source/detail?r=1e6d87a36dcdca231721dde8cbbc26610fb3df27
2015-04-28 23:08:30 -03:00
Florian Walch
a903407471 vim-patch.sh: Fix indentation, use GH URL for tagged versions. #2525
* Link to the commit details on GitHub for a tagged version.
* Non-tagged patches (runtime updates) are still linked to
  Google Code because they are identified by a Mercurial commit hash.
2015-04-28 17:29:20 +03:00
Thiago de Arruda
8d59e74f6c msgpack: coerce Ints to Windows/Buffers/Tabpages
Add conversion checking when generating msgpack handlers.
2015-04-13 10:20:42 -04:00
David Bürgin
cb7bb70c49 scripts: Fix "test input line" logic in legacy2luatest.pl #2369
Fixes the handling of the initial input lines of a test script by simply
skipping all initial empty lines.

Helped-by: Florian Walch <florian@fwalch.com>
Suggested-by: Florian Walch <florian@fwalch.com>
2015-04-09 11:40:09 -04:00
Gustaf Lindstedt
a9e6a768c5 legacy test script: minor string handling fix #2181
Add check to see if a string contains ], which can result in
cases where wrapping a string in [[...]] breaks. Use [=[...]=] instead
on those strings.

Use [=[...]=] for insert() and expect().
2015-03-20 18:19:19 -04:00
Michael Reed
08d2f7b562 scripts/vim-patch.sh: Misc. improvements #2108
- Check for mercurial before using it
- Make 'Merging patches...' wiki page easier to copy
- Use `basename` instead of assuming the user is running vim-patch.sh
  via the repo root
- Appease shellcheck by quoting path variables
- Remove unneeded variable quoting inside [[ ]] blocks
- Don't unconditionally 'exit 1'
  '-h' and '--help' are both recognized options, so current behavior is
  misleading.
2015-03-16 11:00:24 -04:00
Thiago de Arruda
8f31ebc4f7 macro: Add MAX macro and rename min to MIN 2015-02-16 23:17:38 -03:00
Michael Reed
84ca5f973d scripts/vim-patch: Allow equivalent shorthand args 2015-02-02 01:11:19 -05:00
Eliseo Martínez
6762f172d7 Remove long_u: ex_cmds_defs.h: Refactor long_u.
CommandDefinition.cmd_argt: long_u --> uint32_t.
2015-01-19 19:41:27 +01:00
Florian Walch
0cbc48ea89 vim-patch.sh: Add option to list missing Vim changesets. 2015-01-14 09:51:19 +01:00
Florian Walch
d8175bfa95 Improve legacy2luatest script.
* Remove 'test' prefix from test names.
 * Ask if existing spec files should be overwritten.
 * Fix for legacy tests with no initial buffer content (e.g. test_signs).
2014-12-27 16:05:06 +01:00
Florian Walch
0ae2acdc86 Improvements to vim-patch script. 2014-12-25 23:32:40 +01:00
Florian Walch
b1d025a0c8 Ignore update errors in vim-patch script. 2014-12-23 11:15:42 +01:00
Thiago de Arruda
8b6cfff6a1 msgpack-rpc: Allow registration of handlers by other modules 2014-12-08 23:44:23 -03:00
Rui Abreu Ferreira
05d72e9826 Refactor declaration generation
- Call compiler from CMake instead of lua script to generate a
  preprocessor file - allows for better/early error detection if
  the compiler fails
- Preprocessor files are saved along with the headers as .i files
- Accept preprocessor lines with trailing chars after # as is
  the case in Clang/Windows
- The fourth argument to gendeclarations.lua is now the path to
  the proprocessor output file
2014-11-29 23:39:52 +00:00
Florian Walch
b27eadbcf2 Add helper script for porting vim patches. 2014-11-21 16:11:32 +01:00
Florian Walch
9376b3db4b Improve legacy2luatest script. 2014-11-09 15:06:03 +01:00
Florian Walch
bc6ac59928 Add legacy test conversion script. 2014-11-04 11:38:06 -03:00
Thiago de Arruda
64844b7312 msgpack-rpc: Improve logging of msgpack-rpc messages
- Expose more logging control from the log.c module(get log stream and omit
  newlines)
- Remove logging from the generated functions in msgpack-gen.lua
- Refactor channel.c/helpers.c to log every msgpack-rpc payload using
  msgpack_object_print(a helper function from msgpack.h)
- Remove the api_stringify function, it was only useful for logging msgpack-rpc
  which is now handled by msgpack_object_print.
2014-10-23 21:46:03 -03:00
Thiago de Arruda
b31a74ad11 debug: Improve debugging of msgpack-rpc requests
- Add the api_stringify function to display API objects
- Use api_stringify to display request arguments and return values in DLOG
  statements.
2014-10-22 11:26:43 -03:00
Thiago de Arruda
4233446344 debug: Fix broken DLOG macro calls 2014-10-22 11:26:43 -03:00
Thiago de Arruda
72e3e57bf1 msgpack-rpc: Allow selective deferral API calls
Since all API functions now run immediately after a msgpack-rpc request is
parsed by libuv callbacks, a mechanism was added to override this behavior and
allow certain functions to run in Nvim main loop.

The mechanism is simple: Any API function tagged with the FUNC_ATTR_DEFERRED (a
"dummy" attribute only used by msgpack-gen.lua) will be called when Nvim main
loop receives a K_EVENT key.

To implement this mechanism it was necessary some restructuration on the
msgpack-rpc modules, especially in the msgpack-gen.lua script.
2014-10-21 11:05:49 -03:00
Thiago de Arruda
b280308ac6 msgpack-rpc: Create subdirectory for msgpack-rpc modules
Create the msgpack_rpc subdirectory and move all modules that deal with
msgpack-rpc to it. Also merge msgpack_rpc.c into msgpack_rpc/helpers.c
2014-10-21 11:05:49 -03:00
Thiago de Arruda
69561ea922 test: Remove run-functional-tests.py
Now that the lua client is available, python/lupa are no longer necessary to run
the functional tests. The helper functions previously defined in
run-functional-tests.py were adapted to test/functional/helpers.lua.
2014-10-16 09:21:37 -03:00
Thiago de Arruda
f6a008a182 test: Add 'eval' functional helper
The eval helper transforms vimL expressions into lua tables, it's useful for
verifying function output.
2014-10-01 09:31:57 -03:00
Thiago de Arruda
42d5b526b9 test: Replace vroom by lua/busted for functional tests
The 'lupa' python package provides a simple way to seamless integrate lua and
python code.

This commit replaces vroom by a python script that exposes the 'neovim' package
to a lua state, and invokes busted to run functional tests. This is a temporary
solution that will enable writing functional tests using lua/bused while a lua
client library is not available.

The reason for dropping vroom is flexibility: Lua/busted has a nice DSL-style
syntax while also providing the customization power of a full programming
language. Another reason is to use a single framework for unit/functional tests.

Two other changes were performed in this commit:

- Instead of "gcc-unittest/gcc-ia32", the travis builds for gcc are now
  identified by "gcc/gcc-32". They will run unit/functional tests for both 64
  and 32 bits.
- Old integration tests(in src/nvim/testdir) are now ran by the 'oldtest' target
2014-09-30 17:37:16 -03:00
Thiago de Arruda
ddecfb763b deps: Switch lua msgpack library to one that supports 2.0 2014-09-16 14:14:00 -03:00