Commit Graph

14 Commits

Author SHA1 Message Date
ZyX
65fb622000 functests: Replace execute with either command or feed_command
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:

1. msgpackparse() will show internal error: hash_add() in case of duplicate
   keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
   expected. Test was still functioning somehow though. Currently fixed.
2017-04-09 03:24:08 +03:00
Justin M. Keyes
43ba7f4d98 eval.c: set_selfdict(): Fix invalid memory access. 2016-12-14 20:52:18 +01:00
Justin M. Keyes
1a4f13ba8f test: helpers.retry() 2016-12-07 17:03:52 +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
Björn Linse
61e8adb25e eval: implement timers. vim-patch: 7.4.1578, 7.4.1831
For the moment, timers are triggered during sleep,
but not in wait-for-input modes, like press-RETURN or f_getchar()
2016-05-24 22:08:56 +02:00
Thiago de Arruda
c6ec148f2d Rewrite hexadecimal escape sequences as decimal in lua strings
The hexadecimal notation is a Luajit extension which is not compatible with Lua
5.1. While Lua 5.2 does support hexadecimal sequences, it is better to target
Lua 5.1 for maximum compatibility with Luajit(which has fully compatible with
5.1 API/ABI).
2016-03-07 03:58:35 -03:00
Marco Hinz
d9fbc1865b test/functional: clean up according to luacheck (part 2) 2015-11-23 13:57:21 +01:00
Lucas Hoffmann
8f4e3a68a8 tests: Use new write_file() function in tests. 2015-06-30 18:06:06 +02: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