aboutsummaryrefslogtreecommitdiff
path: root/test/unit
Commit message (Collapse)AuthorAge
...
* refactor: add tests for env_expand_escbobtwinkles2015-03-24
|
* tests: prevent busted from reloading the ffi module and othersJohn Szakmeister2015-03-01
| | | | | | | | | | | 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.
* tests: require luassert in the helpersJohn Szakmeister2015-03-01
| | | | | | | | 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.
* Merge pull request #1965 from jszakmeister/fix-fs-spec-test-for-freebsdJohn Szakmeister2015-02-11
|\ | | | | Fix an fs_spec test under FreeBSD and a symlinked home directory.
| * Fix an fs_spec test under FreeBSD and a symlinked home directory.John Szakmeister2015-02-09
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #1958 from ↵John Szakmeister2015-02-11
|\ \ | | | | | | | | | | | | jszakmeister/fix-unittest-header-parsing-on-freebsd unittests: define _Thread_local to be nothing
| * | unittests: define _Thread_local to be nothingJohn Szakmeister2015-02-09
| |/ | | | | | | | | This helps the LuaJIT ffi module to parse the header correctly. Otherwise, the whole suite of tests fail.
* / Get rid of a bashism in the fs_spec test. #1964John Szakmeister2015-02-09
|/ | | | | FreeBSD doesn't use bash by default, causing the group id to be print out in the middle of the test.
* test: fix formatc.lua oddity on OSX/gccNicolas Hillegeer2015-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primitive C canonicalizer we use to strip out duplicate header declarations and keep luajit's ffi happy, didn't work properly in this case. What happened is this (in /usr/include/ctype.h): __DARWIN_CTYPE_TOP_inline int isspecial(int _c) { return (__istype(_c, _CTYPE_T)); } Gets preprocessed to something like: __inline int isspecial(int _c) { return (__istype(_c, _CTYPE_T)); } On OSX/gcc. The formatter wasn't recognizing this entire function as something to put on a single line because it naively just checks for "static" or "inline" for that, but not "__inline". This error doesn't occur on OSX/clang. Without looking further into it, I guess that __DARWIN_CTYPE_TOP_inline gets defined to inline on clang, but __inline on gcc, for some reason. This helps issue #1572 along.
* test/os/fs: fix call to lfs.attributesNicolas Hillegeer2015-01-16
| | | | | | | | The second argument to lfs.attributes() serves only to select a specific part of the normally returned table. It's not a file open flag (e.g.: as for fopen() in C). Also made the (n)eq checks a bit more idiomatic. Fixes #1831
* mch_early_init() -> early_init().Scott Prager2014-11-28
| | | | | Move general initialization functions to early_init, which simplifies test/unit/helpers.lua, which requires all these functions.
* unittest: increase number of retries in cimportStefan Hoffmann2014-10-30
|
* unittest: fix handling of pragma pack in `cimport`Stefan Hoffmann2014-10-30
|
* update os_can_exe unit testScott Prager2014-09-17
|
* vim-patch:7.4.235Scott Prager2014-09-17
| | | | | | | Problem: It is not easy to get the full path of a command. Solution: Add the exepath() function. https://code.google.com/p/vim/source/detail?r=5ab2946f7ce560985830fbc3c453bb0f7a01f385
* unit tests: initialize everythingJustin M. Keyes2014-09-11
|
* unit tests: avoid global scope; add missing cimportsJustin M. Keyes2014-09-11
| | | | temporarily comment out call to vim_deltempdir() to avoid segfault
* unit tests: helpers.lua: hack to avoid empty popen() resultJustin M. Keyes2014-09-11
|
* fileid: rename os_file_id_equal_file_infoStefan Hoffmann2014-08-31
|
* fileid: rename os_file_id_equalStefan Hoffmann2014-08-31
|
* fileid: rename os_get_file_idStefan Hoffmann2014-08-31
|
* fileinfo: rename os_file_info_get_inodeStefan Hoffmann2014-08-31
|
* fileinfo: rename os_file_info_get_idStefan Hoffmann2014-08-31
|
* fileinfo: rename os_file_info_id_equalStefan Hoffmann2014-08-31
|
* fileinfo: rename os_get_file_info{,_link,_fd}Stefan Hoffmann2014-08-31
|
* fileinfo: implement os_fileinfo_blocksizeStefan Hoffmann2014-08-31
|
* fileinfo: implement os_fileinfo_hardlinksStefan Hoffmann2014-08-31
|
* fileinfo: implement os_fileinfo_sizeStefan Hoffmann2014-08-31
| | | | this replaces os_get_file_size and file_info.stat.st_size
* unittest: Move FileInfo tests one level upStefan Hoffmann2014-08-31
|
* unittest: Remove remaining moonscript referencesThiago de Arruda2014-08-31
|
* unittest: convert set.moon to luaThiago de Arruda2014-08-31
|
* unittest: convert preprocess.moon to luaThiago de Arruda2014-08-31
|
* unittest: convert users_spec.moon to luaThiago de Arruda2014-08-31
|
* unittest: convert path_spec.moon to luaThiago de Arruda2014-08-31
|
* unittest: convert fs_spec.moon to luaThiago de Arruda2014-08-31
|
* unittest: convert env_spec.moon to luaThiago de Arruda2014-08-31
|
* unittest: convert helpers.moon to luaThiago de Arruda2014-08-31
|
* unittest: convert garray_spec.moon to luaThiago de Arruda2014-08-31
|
* path.c: Learn invocation_path_tail().Scott Prager2014-08-17
| | | | | Required for vim patch 276 as an alternative to `get_isolated_shell_name()`.
* os_fchown: enable 'change group' unittest on Travis-CIPavel Platto2014-08-13
| | | | | | | | Add section `before_install` in `.travis.yml` to create test group and add current user to this group. It is needed because by default user on Travis-CI belongs only to one primary group derived from that user. So we have no alternative to change group of the file.
* os_fchown: add unit testsPavel Platto2014-08-13
|
* Units: Move NULL, OK, and FAIL to helpers.moon. #982Scott Prager2014-07-30
|
* test/shell: add testsNicolas Hillegeer2014-07-27
| | | | | - The calls to (partially) initialize logging need to go. Blocked on #981.
* test/helpers: allow interning Pascal stringsNicolas Hillegeer2014-07-27
| | | | | os_system() returns a Pascal string, for example (it also NUL-terminates the string, but that's neither here nor there).
* test/formatc: improve standalone usageNicolas Hillegeer2014-07-27
| | | | Easier testing.
* test/formatc: improve 'inline' function handlingNicolas Hillegeer2014-07-27
| | | | | Apple seems to define some functions as `inline` but not `static` in headers. The ghetto parser wasn't unbelievably happy with this.
* Add tests for buffer.c and fileio.cWayne Rowcliffe2014-07-22
|
* Statically allocate NameBuffWayne Rowcliffe2014-07-22
|
* test/fs: move tests of path_full_dir_name to pathNicolas Hillegeer2014-07-16
| | | | | | | | Move tests of path_full_dir_name to path_spec. It is only defined in path.h. Not sure why this works most of the time (I can only trigger a failure when running under lldb). It's a more logical place to have the test as well.
* test/helpers: add 'vim_init' helperNicolas Hillegeer2014-07-16
| | | | | - Initializes some global variables. - Necessary for the buffer tests in PR #904.