Commit Graph

18 Commits

Author SHA1 Message Date
zeertzjq
7d58de11f4
fix(rpc)!: preseve files when stdio channel is closed (#22137)
BREAKING CHANGE: Unsaved changes are now preserved rather than discarded
when stdio channel is closed.
2023-02-11 18:25:01 +08:00
Justin M. Keyes
4bb728dfa0
test: Minimize shada/helpers.lua #10728 2019-08-09 10:23:57 +02:00
Björn Linse
4da5cb38d3 startup: always wait for UI with --embed, unless --headless also is supplied 2018-09-22 10:18:28 +02:00
Justin M. Keyes
b616ef9b22 tests: stderr output contains cp noise
closes #7811
2018-01-05 18:18:26 +01:00
ZyX
6b45dbca04 mark: Make sure that jumplist item will not have zero lnum
Fixes #7169
2017-12-24 00:32:43 +03:00
ZyX
6127eaef05 shada: Fix non-writeable ShaDa directory handling
Before this change,

    nvim -i /etc/shada

segfaults on exit if the file does not exist and user does not have
permissions to create the file at /etc/shada.

Closes #5296
Reported in #5277
https://github.com/neovim/neovim/issues/5277#issuecomment-243937255
2016-09-04 21:45:48 -04:00
Rui Abreu Ferreira
9ce81f7b2b functionaltest: Create lua helper for os.tmpname()
In Windows Lua's os.tmpname() returns relative paths starting with \s,
prepend them with $TEMP to generate a valid path.

In OS X os.tmpname() returns paths in '/tmp' but they should be in
'/private/tmp'. We cannot use os_name() for platform detection because
some tests use tempname() before nvim is spawned, instead use one of the
following:

1. Set SYSTEM_NAME environment variable before calling the tests, it
   is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows')
2. Call uname -s
3. Assume windows
2016-08-31 11:32:28 +01:00
ZyX
ff470bb853 functests: Check logs in lua code
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
2016-06-10 21:50:49 +03: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
704f3dd855 Synchronize shada reset helper with other functional tests 2016-04-11 23:07:52 -03:00
Marco Hinz
4a69e55f39 test/functional: clean up according to luacheck (part 1) 2015-11-23 13:57:21 +01:00
ZyX
1162962d8b functests: Refactor tests:
- Remove unused variables.
- Do not use helpers.nvim_feed in most cases.
- Do not use helpers.nvim and helpers.nvim_eval at all.
- Add helpers.funcs and helpers.\*meths special tables. Indexing such table 
  creates functions which call helpers.call or helpers.nvim (and similar) with 
  first argument equal to table index.
2015-10-08 22:01:12 +03:00
ZyX
7085ea07d8 functests: Move exc_exec to test.functional.helpers 2015-10-08 22:01:10 +03:00
ZyX
b249529676 functests: Make one recover_spec test also use gdb or valgrind 2015-10-08 22:00:45 +03:00
ZyX
830c8bd23e functests: Add a number of “generic” functional tests 2015-10-08 22:00:36 +03:00
ZyX
17b5d27d85 functests: Move wshada and sdrcmd commands to helpers 2015-10-08 22:00:34 +03:00
ZyX
e2994a3c62 shada,functests: Test how ShaDa support code reacts on errors
Some notes:
- Replaced msgpack_unpacker usage with regular xmalloc’ed buffer. Also since
  msgpack_unpack_next (as well as msgpack_unpacker_next) is not ever going to
  return MSGPACK_UNPACK_EXTRA_BYTES this condition was checked manually.
  Function that does return this status is msgpack_unpack, but it is marked as
  obsolete.
- Zero type is checked prior to main switch in shada_read_next_item because
  otherwise check would be skipped.
- Zeroing entry at the start of shada_read_next_item makes it safer.
- dedent('') does not work.
- v:oldfiles list is only replaced with bang, if it is NULL or empty.
2015-10-08 22:00:15 +03:00
ZyX
e143be7f3d functests: Add tests for ShaDa variables dumping/reading 2015-10-08 21:59:52 +03:00