Commit Graph
3573 Commits
Author SHA1 Message Date
Rainer Borene b780e946d5 legacy tests: migrate test9 2014-11-04 12:57:32 -03:00
Rainer Borene d4f92e521c legacy tests: migrate test102 2014-11-04 12:57:32 -03:00
Rainer Borene dbc7a8d987 legacy tests: migrate test4 2014-11-04 12:57:32 -03:00
Rainer Borene 649aeceb38 legacy tests: improvements to functional helpers.lua
- Clean vim registers and functions before each test
- Add eval workaround to the request helper method
- Export dedent method
2014-11-04 12:57:32 -03:00
Björn Linse d6da424758 test/api: add test for set_cursor always updating the screen 2014-11-01 12:05:36 +01:00
Stefan Hoffmann 972fc30599 unittest: increase number of retries in cimport 2014-10-30 19:05:39 +01:00
Stefan Hoffmann 741cb5be08 unittest: fix handling of pragma pack in cimport 2014-10-30 19:05:39 +01:00
Justin M. Keyes 49d5ed5591 fix #1027: :wundo segfault in new, non-empty buffer 2014-10-26 20:03:02 +00:00
Kartik K. Agaram 250298884b fix 'sign unplace id'
Since the introduction of the FOR_ALL_BUFFERS macro, 'sign unplace id'
without a buffer was only removing the sign from the first buffer rather
than all buffers, as described in the documentation.

  :help sign-unplace

--

modeline discussion: https://github.com/akkartik/neovim/commit/7863c247db#commitcomment-8342590
2014-10-28 23:12:41 -04:00
Scott Prager 7203796c54 test/job: Implement some basic jobs tests. 2014-10-28 14:09:28 -03:00
Scott Prager 860b6f6f05 test/shell: Add failure tests for system(). 2014-10-28 14:09:28 -03:00
Thiago de Arruda 53ce5493fa test: Small fixes and improvements to functional helpers.lua
- Move the cleanup function definition into `restart()` so restart can be
  selectively used as a hook
- Improve error handling: Before this, errors while running the event loop would
  cause busted to get stuck. Now the error is properly raised by stopping the
  event loop first.
2014-10-28 09:11:40 -03:00
Thiago de Arruda d696fa51f8 test: verify that msgpacks-rpc exceptions are working 2014-10-23 21:46:09 -03:00
Thiago de Arruda d561ba223d job: Refactor to ensure that all callbacks will be invoked
It's possible that a child process won't close it's standard streams, even after
it exits. This can be evidenced with the "xclip" program:

    :call system('xclip -i -selection clipboard', 'DATA')

Before this commit, the above command wouldn't return, even though the xclip
program had exited. That is because `xclip` wasn't closing it's stdout/stderr
streams, which would block pending_refs from ever reaching 0.

Now the job.c module was refactored to ensure all streams are closed when the
uv_process_t handle is closed.
2014-10-23 21:19:08 -03:00
Nate Sullivan d11fd1950f legacy tests: migrate test35. #1318
Migrate vim's integration test 35 (increment/decrement commands) to
lua/busted.
2014-10-22 15:28:26 -04:00
Thiago de Arruda f7fab4af86 test: verify that v:shell_error is set by system()/systemlist() 2014-10-22 07:15:55 -03:00
Thiago de Arruda 0c2ec77ae0 test: Use lua to perform sanity API checks
Sanity API checks made by the python-client in the api-python travis target were
converted to lua and will now live in this repository. This will simplify
performing breaking changes to the API as it won't be necessary to send parallel
PRs the python-client.
2014-10-16 14:06:54 -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 35d7815eb2 test: Add some specs for the viml function system()
These new specs replace src/nvim/testdir/test_system
2014-10-01 21:41:54 -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 549fc9548d test: Move 'test/legacy' to 'test/functional'
Busted can only discover tests from a single directory. In order to allow tests
under 'legacy' to run as a functional test, it needed to be moved to
'test/functional'.
2014-10-01 09:05:28 -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
Scott Prager 8b3e5829e4 update os_can_exe unit test 2014-09-17 01:01:25 -04:00
Scott Prager 9445eaa297 vim-patch:7.4.235
Problem:    It is not easy to get the full path of a command.
Solution:   Add the exepath() function.

https://code.google.com/p/vim/source/detail?r=5ab2946f7ce560985830fbc3c453bb0f7a01f385
2014-09-17 01:00:24 -04:00
Justin M. Keyes 99a9161bac unit tests: initialize everything 2014-09-11 08:58:17 +00:00
Justin M. Keyes f6088e79b0 unit tests: avoid global scope; add missing cimports
temporarily comment out call to vim_deltempdir() to avoid segfault
2014-09-11 05:17:52 +00:00
Justin M. Keyes c76feb338a unit tests: helpers.lua: hack to avoid empty popen() result 2014-09-11 05:17:52 +00:00
Stefan Hoffmann 10813ce38c fileid: rename os_file_id_equal_file_info 2014-08-31 15:47:43 +02:00
Stefan Hoffmann 3cf7a17a44 fileid: rename os_file_id_equal 2014-08-31 15:47:36 +02:00
Stefan Hoffmann 4e43095ab2 fileid: rename os_get_file_id 2014-08-31 15:43:40 +02:00
Stefan Hoffmann 8a66f4f245 fileinfo: rename os_file_info_get_inode 2014-08-31 15:42:19 +02:00
Stefan Hoffmann 6e3dce144a fileinfo: rename os_file_info_get_id 2014-08-31 15:41:03 +02:00
Stefan Hoffmann edcc1a9732 fileinfo: rename os_file_info_id_equal 2014-08-31 15:39:33 +02:00
Stefan Hoffmann 5d074a0aa6 fileinfo: rename os_get_file_info{,_link,_fd} 2014-08-31 15:37:55 +02:00
Stefan Hoffmann 9ee1c3604c fileinfo: implement os_fileinfo_blocksize 2014-08-31 15:33:23 +02:00
Stefan Hoffmann e85fe0957d fileinfo: implement os_fileinfo_hardlinks 2014-08-31 15:22:38 +02:00
Stefan Hoffmann aa378acdf5 fileinfo: implement os_fileinfo_size
this replaces os_get_file_size and file_info.stat.st_size
2014-08-31 15:15:02 +02:00
Stefan Hoffmann c798611771 unittest: Move FileInfo tests one level up 2014-08-31 14:50:50 +02:00
Thiago de Arruda 7b41fb383a unittest: Remove remaining moonscript references 2014-08-31 14:50:49 +02:00
Thiago de Arruda 38b7b4405e unittest: convert set.moon to lua 2014-08-31 14:50:49 +02:00
Thiago de Arruda 3a951112c0 unittest: convert preprocess.moon to lua 2014-08-31 14:50:49 +02:00
Thiago de Arruda d74ae5be9d unittest: convert users_spec.moon to lua 2014-08-31 14:50:49 +02:00
Thiago de Arruda df50d242f5 unittest: convert path_spec.moon to lua 2014-08-31 14:50:49 +02:00
Thiago de Arruda 227e38f0c6 unittest: convert fs_spec.moon to lua 2014-08-31 14:50:49 +02:00
Thiago de Arruda d39aa51e94 unittest: convert env_spec.moon to lua 2014-08-31 14:50:49 +02:00
Thiago de Arruda dcda179e6a unittest: convert helpers.moon to lua 2014-08-31 14:50:49 +02:00
Thiago de Arruda 097ff4b8b2 unittest: convert garray_spec.moon to lua 2014-08-31 14:50:49 +02:00
Scott Prager b9553bd038 path.c: Learn invocation_path_tail().
Required for vim patch 276 as an alternative to
`get_isolated_shell_name()`.
2014-08-17 22:16:00 -04:00
Pavel Platto 1a361b629a os_fchown: enable 'change group' unittest on Travis-CI
Add section `before_install` in `.travis.yml` to create test group and
add current user to this group.
It is needed because by default user on Travis-CI belongs only to one
primary group derived from that user. So we have no alternative to
change group of the file.
2014-08-13 09:36:09 +03:00
Pavel Platto 64ea24bc17 os_fchown: add unit tests 2014-08-13 09:13:59 +03:00