aboutsummaryrefslogtreecommitdiff
path: root/test/unit/formatc.lua
Commit message (Collapse)AuthorAge
* refactor(unit): add type annotationsLewis Russell2023-04-14
|
* test/unit/formatc: Fix parsing of most recent viml_parser_highlightZyX2017-10-16
|
* unittest: Move nil checks to Gcc:preprocessZyX2017-01-03
|
* unittest: Record previous defines in another placeZyX2017-01-03
| | | | Previous commit made preprocess.lua know how its output will be used. This moves state to cimport, making only it know which is cleaner.
* unittest: Allow multiple indirect includesZyX2017-01-03
| | | | | | | | | | Works by saving all preprocessor defines and reusing them on each run. This also saves NVIM_HEADER_H defines. Saving other defines is needed for defines like `Map(foo, bar)` which are sometimes used to declare types or functions. Saving types or function declarations is not needed because they are recorded as luajit state. Fixes #5857
* Merge tempfile.c back into fileio.cJurica Bradaric2016-04-20
|
* test/unit: clean up according to luacheckMarco Hinz2015-11-23
|
* 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.
* unit tests: avoid global scope; add missing cimportsJustin M. Keyes2014-09-11
| | | | temporarily comment out call to vim_deltempdir() to avoid segfault
* unittest: Remove remaining moonscript referencesThiago de Arruda2014-08-31
|
* 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.
* spelling fixes #827Will Stamper2014-06-12
|
* 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