Vim creates these scripts in test1 depending on what build features
are enabled so that tests that use these features are skiped if
necessary. Because Neovim only has one type of build (and the features
+eval, +windows, and +multi-byte are enabled in this build) they are
not necessary.
This feature was accidentally removed when doing the initial import from vim. It
makes vim use pipes instead of temporary files for filtering buffers through
shell commands.
I found that this was missing when looking for references of
SHELL_READ/SHELL_WRITE outside mch_call_shell`.
When `mch_call_shell` is reimplemented on top of libuv process management
facilities, pipes will always be used for communication with child processes so
it makes sense to enable the feature permanently.
- Valgrind configuration removed
- Fix errors reported by the undefined behavior sanitizer
- Travis will now run two build steps:
- A normal build of a shared library for unit testing(in parallel with gcc)
- A clang build with some sanitizers enabled for integration testing.
After these changes travis will run much faster, while providing valgrind-like
error detection.
Because of the '$' in `if(DEFINED $ENV{VALGRIND_CHECK})` EXITFREE wasn't being
defined, so the `free_all_mem` wasn't being included or called in the resulting
binary.
This commit fixes that, and also adds includes needed for `free_all_mem`
compilation.
On a Mac using shared creates libnvim-test.dylib which cannot be found
by the hardcoded .so extension in helpers.moon, causing the unittests to
fail. However, using module creates libnvim-test.so, allowing the tests
to run. There will still be problems running the tests on windows,
because both shared and module create dll file which will not be found
by in helpers.moon.
Tests will be written using the [moonscript](http://moonscript.org/) language,
a lua 'dialect' that is whitespace-significant and has a syntax similar to
coffeescript. The test framework used is [busted](http://olivinelabs.com/busted/),
a bdd framework for lua/moonscript.
Luajit has a nice ffi module, which lets lua programs link shared libraries and
call it's functions without writing any C code.
To take advantage of this fact for testing C functions, a new target was added
to CMakeLists.txt, which compiles neovim as a shared library that is loaded by
the process running the tests.
This commit adds necessary code for downloading and installing a lua package
manager(luarocks) locally. It wasn't added as a subtree because there are quite
a few blobs in its source tree.
- Cleanup source tree, leaving only files necessary for compilation/testing
- Process files through unifdef to remove tons of FEAT_* macros
- Process files through uncrustify to normalize source code formatting.
- Port the build system to cmake