Commit Graph

31384 Commits

Author SHA1 Message Date
Thomas Wienecke
fcbfd57d1f Add unit tests for ported filesystem functions. 2014-03-03 08:54:02 -03:00
Gaelan
1213e0cc77 Make Travis compile on GCC and Clang. 2014-03-03 08:47:21 -03:00
Gaelan Steele
eb835bc2ca Use -Werror.
This makes all warnings errors. We don't want any warnings, so we should
enforce that.
2014-03-03 08:47:21 -03:00
Nicolas Pierron
d9283c4927 Remove __ARGS macro. Close #205
This is a squash of all commits sent to #81.

- Remove unused undef of __ARGS.
- Fix mch_rename declaration.
- Follow changes related to moved & extracted files.
- Properly indent function declarations of getchar.h and quickfix.c.
2014-03-02 14:19:59 -03:00
aph
2bd6d44403 homebrew: deparallelize build 2014-03-01 22:46:56 +00:00
Theo Belaire
f133ce130e Fixed nvim homebrew formula
I now also do make install
2014-03-01 22:21:08 +00:00
aph
f3aa6dc8f0 README.md: remove lingering references to sha1sum in OSX instructions 2014-03-01 22:19:41 +00:00
Islam Sharabash
f124ebadde Adding darwin platform to common.sh build script 2014-03-01 22:12:13 +00:00
Jakub Stasiak
29ae98d186 Be more explicit about OS X deps installation 2014-03-01 22:11:12 +00:00
Nicolas Pierron
8917bf25bc Clean-up main.c: follow STRNICMP replacement. 2014-03-01 17:01:20 -03:00
John Szakmeister
a90c5aa2fc Use $(MAKE) instead of ${MAKE}, and fixup two more make invocations.
Include a new SINGLE_MAKE which can be used to invoke make but using
only a single job, and in way that avoids any warnings from make.
Use SINGLE_MAKE to execute the tests, since they're meant to be run
serially.

Also, prefer the use of $(MAKE) to avoid invoking an extra subshell
(saves some time).
2014-03-01 16:53:14 -03:00
Ashley Hewson
8cb10e8641 CONTRIBUTING.md: mention coding style 2014-03-01 16:18:54 +00:00
Felipe Oliveira Carvalho
e18c075b70 Extract file_search.c from misc2.c
Continue to split misc2.c in many other files (see #209).

The only changed I made to the moved code was adding
`vim_free(ff_expand_buffer)` to `free_finfile()`. This is was needed
because `ff_expand_buffer` was moved from `misc2.c` to `file_search.c`.
2014-02-28 18:37:01 -03:00
scott-linder
007a19c497 Added a types.h with vim.h unsigned int typedefs. 2014-02-28 18:28:27 -03:00
Nicolas Hillegeer
3f29a02166 MAKE: ask gnulikes to warn and be pedantic + fixes
It seems clang 3.4 thinks the codebase is in fantastic shape and gcc 4.9.0
has only minor niggles, which I fixed:

- fix uninitialized member warning:
    In DEBUG mode the expr member doesn't get properly initialized to NULL.

- fix warnings about directive inside of macro's:
    On some platforms/compilers, sprintf is a macro. Putting macro directives
    inside of a macro is unportable and gcc 4.9 warns about that.

- fix signed vs. unsigned comparison warning:
    The in-memory table will luckily not even come close to the limits imposed
    by ssize_t. If it ever reaches that, we've got bigger problems.
2014-02-28 11:48:43 -03:00
Felipe Oliveira Carvalho
6eece5895e Fix a 'garbage value' warning found by Clang's static analyzer
- Initialize lists in paragraph_start()
 - Remove two dead stores
2014-02-28 08:49:34 -03:00
John Szakmeister
ef6933bd60 Setup better warning flags for Clang. 2014-02-28 08:18:24 -03:00
John Szakmeister
fe226f5376 Only include libintl's include dir if libintl was found.
This prevents an error from CMake when libintl is not found.  It's not a
required library, so we must wrap the inclusion in a conditional.  It
was already done for the library.
2014-02-28 08:16:57 -03:00
John Szakmeister
d2e567a835 Use _NSGetEnviron on Mac OS X to gain access to environ.
When building nvim as a shared library for testing, environ is not
exposed.  In order to gain access to the environment variables, you must
get a pointer to them from _NSGetEnviron().

It appears that this may affect the FreeBSD platform too.
2014-02-28 08:15:27 -03:00
Felipe Oliveira Carvalho
55e00334fb Include "garray.h" in ex_cmds2.c 2014-02-28 06:43:20 -03:00
Felipe Oliveira Carvalho
410f0a27c5 Extract garray.c from misc2.c
Start to split misc2.c in many other files (see #209).
2014-02-28 06:43:20 -03:00
Scott Nielsen
79882bc7bd Use cmake module instead of shared for nvim-test
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.
2014-02-28 05:50:16 -03:00
Thiago de Arruda
4600b9c035 Add unit test running to travis again 2014-02-27 18:51:53 -03:00
John Szakmeister
ba7e4f0c0c Compile libuv with -fPIC.
This is needed so that th unit tests library compiles on 64-bit machines
correctly.
2014-02-27 18:50:06 -03:00
Thiago de Arruda
7637c2b664 Disable unit tests until fixed for travis 2014-02-27 18:37:57 -03:00
Thiago de Arruda
fd448123aa Add more example unit tests and run with travis 2014-02-27 18:31:45 -03:00
Thiago de Arruda
d04ca90f5c Add basic infrastructure for unit testing
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.
2014-02-27 17:55:10 -03:00
Alexis Hildebrandt
05b9e11584 CMakeLists: Improve handling of libintl
by refactoring it into a separate CMake module
2014-02-27 19:11:48 +00:00
Alexis Hildebrandt
fba074d994 CMakeLists: Use nvim target name 2014-02-27 19:11:48 +00:00
John Szakmeister
95db76e280 Improve libintl detection and linking.
This makes it so that a self-installed libintl is now detected and used.
It also attempts to locate a homebrew version of the library, if that
exists.
2014-02-27 19:11:48 +00:00
Alexis Hildebrandt
e728ce95ef Use GNU gettext from homebrew on Mac if available 2014-02-27 19:11:48 +00:00
Rich Wareham
f26b0aa88c Merge pull request #187 from rjw57/issue-179
Use CMAKE_C_FLAGS variable to set compiler flags.
2014-02-27 13:00:25 +00:00
Thiago de Arruda
20b799a6f2 Import luajit 2.0.2 source tree
This will be used for testing and in the future for reimplementing vimscript as
a compile-to-lua language.
2014-02-27 09:37:08 -03:00
Rich Wareham
4d4a706352 README.md: fix anchor tags for CentOS/RHEL section
MAke the use of anchor tags consistent for the change introduced in
5cd3cbe.
2014-02-27 09:35:32 -03:00
Rich Wareham
de77dddc0b README: add note on RHEL/CentOS 6
Add note on autoconf >2.69 being required for compilation under
RHEL/CentOS.

Closes #178.
2014-02-27 09:35:32 -03:00
Rich Wareham
1f827beff0 Use CMAKE_C_FLAGS variable to set compiler flags.
If the compiler is some GNU-alike variant, set the compiler flags to use
the gnu99 dialect of C and enable all warnings.

Non-GNU compilers may have to have their own magic added to set dialect
and enable warnings.

Closes #179.
2014-02-27 12:29:44 +00:00
Rich Wareham
29f4e8ebc4 Merge pull request #183 from rjw57/issue-178
README: add note on RHEL/CentOS 6
2014-02-27 10:28:06 +00:00
Rich Wareham
97e635e8b6 Merge pull request #184 from equalsraf/tb-curses
Use FindCurses.cmake as fallback to find curses libraries
2014-02-27 10:27:49 +00:00
Rich Wareham
2bb9487b68 README.md: fix anchor tags for CentOS/RHEL section
MAke the use of anchor tags consistent for the change introduced in
5cd3cbe.
2014-02-27 09:58:52 +00:00
Rich Wareham
5cd3cbe517 README: add note on RHEL/CentOS 6
Add note on autoconf >2.69 being required for compilation under
RHEL/CentOS.

Closes #178.
2014-02-27 09:55:23 +00:00
Rich Wareham
653c1eb0d2 Merge pull request #180 from pmandera/readme-links
Fixed headers and links to dependencies in README.md
2014-02-27 09:55:01 +00:00
Paweł Mandera
40faad4be4 Anchors and reorder in dependency lists of README.md
Dependency headers for OSes needed anchors to work with links from
content list. Reordered OSes in content list to match headers
(all Linuxes first, Mac OS X last)
2014-02-27 10:25:07 +01:00
Rui Abreu Ferreira
82b724af4b Use FindCurses to find curses libraries
- Some systems have the FindCurses.cmake module to find
  the curses/ncurses libraries using find_package(). And
  in some CheckLibraries is not very reliable, so as
  fallback FindCurses is now used if no other option
  works.
2014-02-27 09:23:15 +00:00
Paweł Mandera
740296415d Fixed header levels in markdown
Fixed header markup in README.md. Previously, header markup did not match levels in the content list.
2014-02-27 10:16:33 +01:00
Thiago de Arruda
2c02f00b7c Enable stderr for test in travis
This is necessary to keep the build from 'erroring' since running the tests
with valgrind will take a long time
2014-02-26 22:42:10 -03:00
Thiago de Arruda
a2ce1df772 Modify travis configuration to install valgrind
This should fix previous build failures
2014-02-26 22:23:51 -03:00
Thiago de Arruda
a81d25e6e4 Remove -e option from travis shell script 2014-02-26 21:44:04 -03:00
Thiago de Arruda
c492c5e36d Fix travis script
It was broke because the ls command failed when no valgrind.* file were found
2014-02-26 21:38:21 -03:00
Thiago de Arruda
a97c1754ad Add test reporting to travis script 2014-02-26 21:33:39 -03:00
Thiago de Arruda
42a9654fae Enable valgrind when testing on travis
This will slow down testing but will detect pull requests that introduce memory
leaks.
2014-02-26 20:19:58 -03:00