Commit Graph

288 Commits

Author SHA1 Message Date
Justin M. Keyes
3de0f5654b tests: fix 005_bufleave_delete_buffer_spec.lua
- After _spec suffix was added so busted could find the test, it failed.
- The original legacy test wrote to a "test.out", but the new test uses
  register @A.
- Original test did not contain 1d and new test shouldn't either.

ref c152cdd0f3
2015-03-11 01:47:38 -04:00
Justin M. Keyes
f8f07891e7 tests: add missing "_spec" suffix 2015-03-11 00:56:53 -04:00
Rainer Borene
c9fefe2a74 legacy tests: migrate test84 2015-03-11 00:22:23 -04:00
Rainer Borene
126b169f99 legacy tests: migrate test91 2015-03-11 00:22:23 -04:00
Rainer Borene
1e4a5f878f legacy tests: migrate test90 2015-03-11 00:22:23 -04:00
Rainer Borene
a1aacb2a32 legacy tests: migrate test95 2015-03-11 00:22:23 -04:00
Rainer Borene
2cfecf5420 legacy tests: migrate test15 2015-03-11 00:22:23 -04:00
Rainer Borene
0099f6148c legacy tests: migrate test_listlbr_utf8 2015-03-11 00:22:23 -04:00
Rainer Borene
0f97f52ded legacy tests: migrate test98 2015-03-11 00:22:22 -04:00
Rainer Borene
9c40721ea4 legacy tests: migrate test103 2015-03-11 00:22:22 -04:00
Rainer Borene
05fcce3896 legacy tests: migrate test_qf_title 2015-03-11 00:00:22 -04:00
Rainer Borene
b18cd63260 legacy tests: migrate test100 2015-03-11 00:00:22 -04:00
Björn Linse
a7aeda8c7a tests/ui: Also test character at cursor 2015-03-09 08:01:49 -03:00
John Szakmeister
638452da2a Merge pull request #2082 from jszakmeister/fixes-for-busted-and-luajit
tests: prevent busted from reloading the ffi module and others
2015-03-09 05:47:48 -04:00
Gustaf Lindstedt
2d65ccf06c test: migrate legacy test 77 #2046
Migrate legacy test 77 which tests mf_hash_grow() to lua/busted.
2015-03-08 23:27:54 -04:00
Björn Linse
5be040ffe4 jobsend: Don't append extra newline after last item
This allows sending binary data that is not newline terminated
2015-03-03 20:18:24 +01:00
John Szakmeister
d8ef23849a tests: prevent busted from reloading the ffi module and others
It turns out that Busted started cleaning the environment in 2.0rc5 as a
result of Olivine-Labs/busted#62.  This, in turn, caused the ffi module
to be reloaded for each spec file, and LuaJIT doesn't appreciate it.
The net effect is an assertion error in LuaJIT.

By using the --helper feature of Busted, we can pre-load some modules
ahead of Busted and prevent it from reloading them--making LuaJIT happy
again.
2015-03-01 15:25:39 -05:00
John Szakmeister
ea35062589 Merge pull request #2075 from jszakmeister/dont-hardcode-tty-test-path
tests: don't hardcode the path to tty-test
2015-03-01 15:24:00 -05:00
John Szakmeister
235909044a tests: require luassert in the helpers
This is necessary for newer versions of Busted, otherwise assert will be
nil and the tests will die.

Note: this does not mean the tests now work with the latest Busted.
There are still several issues preventing that from happening.
2015-03-01 09:00:27 -05:00
John Szakmeister
c1e8d12aa3 tests: don't hardcode the path to tty-test
This fixes the build for those who drive the build directly using
CMake.
2015-02-28 10:46:56 -05:00
Numkil
bbc9eff9ae test: mark job/pty test as pending #2058
- closes #2057
- see https://github.com/neovim/neovim/issues/2057 for discussion
2015-02-26 19:23:37 -05:00
Thiago de Arruda
d7e560e5b3 job: Allow spawning jobs connected to pseudo terminals 2015-02-23 21:43:33 -03:00
Thiago de Arruda
d28011ee1c eval: Fix buffering of data in job autocommands
Job autocommands will no longer buffer data chunks that don't end in newlines
characters.
2015-02-23 21:43:33 -03:00
Thiago de Arruda
3baba1e7bc refactor: Remove term modules and termcap options
- Removed term.c, term.h and term_defs.h
- Tests for T_* values were removed. screen.c was simplified as a
  consequence(the best strategy for drawing is implemented in the UI layer)
- Redraw functions now call ui.c functions directly. Updates are flushed with
  `ui_flush()`
- Removed all termcap options(they now return empty strings for compatibility)
- &term/&ttybuiltin options return a constant value(nvim)
- &t_Co is still available, but it mirrors t_colors directly
- Remove cursor tracking from screen.c and the `screen_start` function. Now the
  UI is expected to maintain cursor state across any call, and reset it when
  resized.
- Remove unused code
2015-02-21 05:08:21 -03:00
Thiago de Arruda
f9d327c88b test: Add extra screen expectation to prevent race condition
This is to ensure ctrl+c is only pressed after the command has started executing
in the viml_system_spec.lua system() interrupt test.
2015-02-20 20:41:03 -03:00
Thiago de Arruda
a21d952bdd test: Remove temporary files created by 072_undo_file_spec.lua 2015-02-20 20:40:02 -03:00
Thiago de Arruda
aed19a7c5f test: Remove -g flag from pynvim call in Screen.debug
The flag is no longer valid(pynvim always starts a GUI)
2015-02-20 20:38:42 -03:00
Fabian Brosda
20054df06e legacy test: migrate test 72 2015-02-20 13:26:59 -03:00
Thiago de Arruda
e7c945ab59 input: Escape utf8 sequences that contain CSI/K_SPECIAL 2015-02-18 13:16:30 -03:00
Felipe Morales
3ffc5d81c3 Add TabClosed event
TabClosed is triggered when a tab page closes.
2015-02-16 23:24:31 -05:00
Felipe Morales
66d94869a0 Add TabNewEntered
TabNewEntered is triggered after vim has entered a buffer in new tab.
2015-02-16 23:24:30 -05:00
Felipe Morales
817be96be5 Add TabNew event
TabNew triggers when entering a new tab page, but not when entering an
already created one.
2015-02-16 23:24:30 -05:00
Thiago de Arruda
40b7990553 test: Fix 051_highlight_spec.lua
- The syntax `gui=` is invalid when setting properties of highlight group.
- Wait for the initial "-- More --" prompt before continuing. Required to avoid
  a race condition
2015-02-16 23:17:39 -03:00
Thiago de Arruda
d8f3458ec7 syntax: Refactor to store all term and gui attributes independently
Now the attrentry_T structure will store all attributes in separate fields for
cterm and rgb UIs.
2015-02-16 23:17:39 -03:00
Thiago de Arruda
98dca8a827 test: Increase default_screen_timeout when running on travis
Some screen tests such as system/ctrl+c(viml_system_spec.lua) can take some time
to respond(default kill timeout is 2 seconds for an interrupted job) and fail
when running under a slow environment such as travis.
2015-02-16 23:17:38 -03:00
Thiago de Arruda
291e15c60a test: Remove unnecessary tests from viml_system_spec.lua
The `system` function is never executed with these tests because the ctrl+c is
queued with the input string that calls it(The `process_interrupts` function
will destroy all previous input when a ctrl+c is found).
2015-02-16 23:17:38 -03:00
Thiago de Arruda
e974b00283 test: Fix race condition in window_spec.lua
Without waiting for the 'gg' command to be processed, its possible that the
following assertion will fail.
2015-02-16 23:17:38 -03:00
Thiago de Arruda
e6208df73e test: Add synchronization helper for functional tests
The `wait` function will only return after all input has been processed by nvim.
It is useful to time assertions correctly.
2015-02-16 23:17:38 -03:00
Björn Linse
f4f0f646c3 api: always return empty string as api type String 2015-02-16 20:13:54 -05:00
Björn Linse
f56d1dc838 test: NULL-initialized vimscript strings should eval to empty strings 2015-02-16 20:13:53 -05:00
Justin M. Keyes
1b055c54a0 FEAT_SIGNS: restore :signs wildmenu, and add test. 2015-02-15 02:49:59 -05:00
Felipe Morales
6e992876ea shadow previously set signs #1893 2015-02-13 14:56:43 -05:00
John Szakmeister
f1f1f711c7 Merge pull request #1965 from jszakmeister/fix-fs-spec-test-for-freebsd
Fix an fs_spec test under FreeBSD and a symlinked home directory.
2015-02-11 19:45:26 -05:00
John Szakmeister
dd12238329 Merge pull request #1958 from jszakmeister/fix-unittest-header-parsing-on-freebsd
unittests: define _Thread_local to be nothing
2015-02-11 04:04:54 -05:00
Thiago de Arruda
4c92a0baca deps: Add Luajit compilation flags to improve debugging 2015-02-10 09:57:24 -03:00
John Szakmeister
3562f686b0 Get rid of a bashism in the fs_spec test. #1964
FreeBSD doesn't use bash by default, causing the group id to be print
out in the middle of the test.
2015-02-09 12:44:22 -05:00
John Szakmeister
41d8c8980b Fix an fs_spec test under FreeBSD and a symlinked home directory.
It turns out the FreeBSD 10 VM has a symlink for the home directory to
/usr/home.  Unfortunately, this breaks the test as arg[0] may not have
the symlink resolved, but the path returned from the exe() call will.
As a result, the comparison fails, even though the result is correct.

Let's fix this by running the absolute path through exe() too, and then
comparing the results.
2015-02-09 06:49:11 -05:00
John Szakmeister
bc6ef4bf80 unittests: define _Thread_local to be nothing
This helps the LuaJIT ffi module to parse the header correctly.
Otherwise, the whole suite of tests fail.
2015-02-09 05:37:24 -05:00
Thiago de Arruda
11fa4f42fd test: Remove nondeterminism in systemlist interrupt tests
The systemlist test currently calls the `echo` command which can potentially
complete before being interrupted, causing random test failures.

Use `yes | xargs` instead. A `yes` invocation that is not piped through `xargs`
can produce a huge amount of lines in a very short time, leading memory
starvation when the result is being converted into a list. `xargs` ensures only
one line of output will be produced while allowing interrupt to be tested.
2015-02-06 15:24:08 -03:00
Björn Linse
f468fb70cb api/vim: allow guis and tests to retrieve the entire color table 2015-02-02 14:56:58 -03:00