Commit Graph

134 Commits

Author SHA1 Message Date
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
Thiago de Arruda
31f835adc4 msgpack-gen: Fix msgpack_rpc_init_function_metadata
The function was broken on release builds
2014-09-16 14:14:00 -03:00
Thiago de Arruda
2d1b5589e8 server: Rename address environment variable
To follow the pattern of using NVIM for technical descriptions, it was renamed
to NVIM_LISTEN_ADDRESS
2014-09-13 21:35:47 -03:00
Thiago de Arruda
545acf2024 api metadata: Allow typed container information in api functions
Adapt gendeclarations.lua/msgpack-gen.lua to allow the `ArrayOf(...)` and
`DictionaryOf(...)` types in function headers. These are simple macros that
expand to Array and Dictionary respectively, but the information is kept in the
metadata object, which is useful for building clients in statically typed
languages.
2014-09-12 13:50:07 -03:00
Thiago de Arruda
cd2e46c078 api/msgpack-rpc: Refactor metadata object construction
Instead of building all metadata from msgpack-gen.lua, we now merge the
generated part with manual information(such as types and features). The metadata
is accessible through the api method `vim_get_api_info`.

This was done to simplify the generator while also increasing flexibility(by
being able to add more metadata)
2014-09-12 13:50:07 -03:00
Thiago de Arruda
cac24cb06d api/msgpack-rpc: Refactor msgpack_rpc_helpers.{c,h}
- Move helpers that are specific to API types to api/private/helpers.{c,h}
- Include headers with generated declarations
- Delete unused macros
2014-09-12 13:25:28 -03:00
Thiago de Arruda
2f566c83d9 api/msgpack-rpc: Parse type information from api/private/defs.h
Enhance msgpack-gen.lua to extract custom api type codes from the ObjectType
enum in api/private/defs.h. The type information is made available from the api
metadata and clients can use to correctly serialize/deserialize these types
using msgpack EXT type.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
d5e3cede28 msgpack-rpc: Remove support for integer ids in methods
There's no need to have integer and string ids, and since we now fully support
msgpack-RPC, support for integer ids was removed.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
cd70b9c015 msgpack-rpc: Refactor API metadata discovery method
A new method is now exposed via msgpack-rpc: "get_api_metadata". This method has
the same job as the old method '0', it returns an object with API metadata for
use by generators.

There's one difference in the return value though: instead of returning a
string containing another serialized msgpack document, the metadata object is
returned directly(a separate deserialization step by clients is not required).
2014-09-12 13:25:28 -03:00
Thiago de Arruda
19bc29ee83 msgpack-rpc: Move handle_missing_method to msgpack_rpc.c
Since that function is not automatically generated, it's best to place it in a
normal C module
2014-09-12 13:25:28 -03:00
Thiago de Arruda
74aff19691 msgpack-rpc: Refactor initializer and dispatcher
Use Map(String, rpc_method_handler_fn) for storing/retrieving rpc method
handlers in msgpack_rpc_init and msgpack_rpc_dispatch.

Also refactor serialization/validation functions in the
msgpack_rpc.c/msgpack_rpc_helpers.c modules to accept the new STR and BIN types.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
c39ae3e4d4 map/msgpack-rpc: Declare/define maps rpc method handlers
The new map type uses `String` instances as keys to avoid unnecessary copying to
zero-terminated buffers.
2014-09-12 13:25:28 -03:00
Thiago de Arruda
e2143674ae deps: Update to the experimental msgpack v5 branch
Using msgpack v5 will let nvim be more compatible with msgpack libraries for
other platforms.

This also replaces "raw" references by "bin" which is the new name for msgpack
binary data type
2014-09-12 13:19:50 -03:00
Thiago de Arruda
aa23d2f835 msgpack-rpc: Accept method names in requests 2014-08-29 22:08:58 -03:00
Thiago de Arruda
b744073fae test: Remove cleanup function definition from run-api-tests.exp
This function is now injected automatically when running the python-client tests
2014-08-28 14:07:31 -03:00