aboutsummaryrefslogtreecommitdiff
path: root/test/unit
Commit message (Collapse)AuthorAge
...
* garray: add unit tests for ga_concat_strings_sepNicolas Hillegeer2014-04-29
|
* garray: add unit testsNicolas Hillegeer2014-04-29
| | | | Only append_ga_line() was not tested because it relies on global vim state.
* Test and refactor `shorten_fname` and `shorten_fname1`John2014-04-29
| | | | | Rename `shorten_fname` -> `path_shorten_fname` Rename `shorten_fname1` -> `path_shorten_fname_if_possible`
* test: no longer define ad-hoc C headersNicolas Hillegeer2014-04-28
| | | | With the improved cimport helper, we can just load what we want.
* test: fix the cimport methodNicolas Hillegeer2014-04-28
| | | | | | | | | | | | | | | | | | This commit will hopefully allow the cimport method to be used just as one would use #inclue <header.h> in C. It follows the following method: 1. create a pseudoheader file that #include's all the requested header files 2. runs the pseudoheader through the C preprocessor (it will try various compilers if available on the system). 3. runs the preprocessed file through a C formatter, which attempts to group statements on one line. For example, a struct definition that was formerly on several lines will take just one line after formatting. This is done so that unique declarations can be detected. Duplicates are thus easy to remove. 4. remove lines that are too complex for the LuaJIT C parser (such as: Objective-C block syntax, crazy enums defined on linux, ...) 5. remove duplicate declarations 6. pass result to ffi.cdef
* port vim_mkdir, mch_rmdir and mch_remove to libuvStefan Hoffmann2014-04-11
|
* Fix broken build due to unit test include orderJohn Schmidt2014-04-09
| | | | | | | | | | | Commit 4348d1e6f74a87af55c6c01e7a0cb292e9dec114 introduced a bug that breaks the unit tests unless they run in a certain order. Both path.moon and os/fs.moon tries to include the same Enum, which fails since ffi.cdef can only include definitions once. This solves the bug by using Lua variables instead of ffi.cdef Enums.
* Move exe functions back to os/fs.cJohn Schmidt2014-04-08
|
* Change prefix from `os_*` to `path_*`John Schmidt2014-04-08
|
* Move and adapt `os_get_absolute_path` unit tests to `vim_FullName`John2014-04-08
| | | | | * Add two new unit tests to `vim_FullName` * Make `os_get_absolute_path` static
* Move functions from os/fs.c into path.cJohn Schmidt2014-04-08
| | | | Move unit tests from os/fs.moon to path.moon
* Use stdbool in os moduleHinidu2014-04-07
|
* Moved mch_get_host_name and renamed it to os_get_hostanmeStefan Hoffmann2014-04-05
|
* Moved mch_get_pid and renamed it to os_get_pidStefan Hoffmann2014-04-05
|
* Replace mch_rename and vim_rename with libuvHinidu2014-04-04
|
* Rename FPC_* constants.Thomas Wienecke2014-04-03
|
* Fix seperator->separator, path_tail_with_separator->path_tail_with_sep.Thomas Wienecke2014-04-03
|
* Test and refactor getnextcomp -> path_next_component.Thomas Wienecke2014-04-03
|
* Test and refactor gettail_sep -> path_tail_with_seperator.Thomas Wienecke2014-04-03
|
* Test and refactor gettail -> path_tail.Thomas Wienecke2014-04-03
|
* Refactor fullpathcmp -> path_full_compare.Thomas Wienecke2014-04-03
|
* Make FPC_* defines an enum type in path.h.Thomas Wienecke2014-04-03
|
* move filewritable() into /src/os/fs.c and rename itStefan Hoffmann2014-04-03
|
* move check_file_readonly() into /src/os/fs.c and rename itStefan Hoffmann2014-04-03
|
* Delete os_delay unit test.Thomas Wienecke2014-04-02
|
* Address clint warnings and other style issues.Thomas Wienecke2014-03-27
| | | | | | | * Add const. * Fix conditions (move && from end to start of line). * Use int32_t instead of long. * Use //-style comments.
* Rename mch_* functions to os_* in os module.Thomas Wienecke2014-03-27
|
* fix mch_delay() unittestStefan Hoffmann2014-03-25
|
* Implement `mch_delay` on top of libuvThiago de Arruda2014-03-24
| | | | | Needed to temporarily move two static variables from os_unix.c to 'globals.h' as those are shared by other functions still in os_unix.
* Revamp the build system.John Szakmeister2014-03-21
| | | | | | | | | | | | | | | | | | | | | This achieves several goals: * Less reliance on scripts so we have better portability to Windows (though we still have a ways to go for proper Windows support). Luajit, luarocks, moonscript, and busted are all installed via CMake now. * Trying to make use of pkg-config to get the correct libraries. The latest libuv is still broken in this regard, but we'll at least be in a position to use it. * Allow the use of Ninja or make. The former runs faster in many environments, and automatically makes use of parallel builds. This also allows for system installed dependencies--though not through the Makefile just yet--and adds support for FreeBSD. This also make us build libuv and luajit as static libraries only, since we're only concerned about having static libraries for our bundled dependencies.
* Revive vim_fname (-> os_file_exists); fix misuse of mch_getperm.Thomas Wienecke2014-03-15
| | | | | | * Move vim_fname from misc1 to os/fs:os_file_exists. * Add unit tests for os_file_exists. * Replace misuse of mch_getperm with os_file_exists.
* Add unit tests for mch_[gs]etperm.Thomas Wienecke2014-03-15
| | | | | Use preprocessor trick proposed by @mahkoh to import 'defines' like S_IRUSR.
* refactored part of expand_env_esc() into mch_get_user_directory()Stefan Hoffmann2014-03-13
|
* moved mch_get_user_name() and mch_get_uname() into os/users.cStefan Hoffmann2014-03-13
|
* refactored logic from init_users() into mch_get_usernames()Stefan Hoffmann2014-03-13
|
* Fix bugs, clean code, add tests.Thomas Wienecke2014-03-07
| | | | | | | | * Add const specifiers, update comments, add assert. * Move os_unix.moon tests to os/fs.moon + clean tests. * Add uv_fs_req_cleanup call. * Add tests with absolute paths to mch_isdir. * Add to_cstr to test/unit/helpers.moon and fix respective unit tests.
* Declare is_executable as static and remove its unit tests.Thomas Wienecke2014-03-07
| | | | | | Testing the public interface mch_can_exe should suffice. Every former test of is_executable has a counterpart in the tests of mch_can_exe. Thus we can keep private things private.
* Move mch_can_exe, executable_file to os/fs.c.Thomas Wienecke2014-03-07
| | | | * Rename executable_file to is_executable.
* Add another unit test to mch_can_exe.Thomas Wienecke2014-03-07
|
* cleanup environment variable handling + unit testsStefan Hoffmann2014-03-06
| | | | | | | | * removed a putenv() implementation which isn't needed anymore * mch_getenv() and mch_setenv() are now functions in src/os/env.c * removes direct calls to getenv() and setenv() outside of src/os/env.c * refactored the logic of get_env_name into mch_getenvname_at_index * added unittests for the functions in os/env.c
* Fix style issues.Thomas Wienecke2014-03-06
| | | | | | | | * Rename mch_full_name to mch_get_absolute_path. * Rename mch_is_full_name to mch_is_absolute_path. * Add a lot of missing parentheses. * Remove yoda-conditions for consistency. * Remove spaces in function declaration.
* Implement pending test.Thomas Wienecke2014-03-05
|
* Port mch_isdir to libuv.Thomas Wienecke2014-03-05
|
* Add unit tests for executable_file and mch_can_exe.Thomas Wienecke2014-03-05
| | | | Caution: There is a pending test which should be implemented.
* Add unit tests for mch_isdir.Thomas Wienecke2014-03-05
|
* Apply small refactor to unit testsThiago de Arruda2014-03-04
| | | | | Redefine macro constants as enums in the ffi and import those in their respective test modules.
* Correct a few parentheses.Thomas Wienecke2014-03-04
|
* Rename and refactor mch_FullName.Thomas Wienecke2014-03-04
| | | | | | | | | * Rename mch_FullName to mch_full_name to match the style guide. * Add mch_full_dir_name, which saves the absolute path of a given directory relative to cwd into a given buffer. * Add function append_path, which glues together two given paths with a slash. * Adapt moonscript coding style to the tests.
* Add unit tests for ported filesystem functions.Thomas Wienecke2014-03-03
|
* Add more example unit tests and run with travisThiago de Arruda2014-02-27
|