aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
Commit message (Collapse)AuthorAge
...
| * tests: Make format_string('%q', ...) output more stableZyX2018-02-02
| | | | | | It appears to be different on lua and luajit.
| * tests: Fix linter errorsZyX2017-12-03
| |
| * Merge branch 'master' into expression-parserZyX2017-11-26
| |\
| * | tests: Stabilize float format and %e in format_luav and format_stringZyX2017-11-19
| | |
| * | *: Fix linter errorsZyX2017-11-19
| | |
| * | unittests,viml/parser/expressions: Start adding asgn parsing testsZyX2017-11-13
| | |
| * | unittests: Fix automatic test case generationZyX2017-11-13
| | |
| * | *: Fix linter errorsZyX2017-11-06
| | |
| * | unittests: Add tests for vim_str2nrZyX2017-11-06
| | |
| * | tests: Add missing test casesZyX2017-11-06
| | |
| * | api/vim,functests: Add tests for nvim_parse_expression, fix found bugsZyX2017-11-06
| | |
| * | tests: Fix testlint errorsZyX2017-11-06
| | |
| * | viml/parser/expressions,tests: Add AST freeing, with sanity checksZyX2017-10-15
| | |
| * | viml/parser/expressions: Create tests for latest additionsZyX2017-10-15
| | |
| * | viml/parser/expressions: Add support for string parsingZyX2017-10-15
| | |
| * | test/helpers: Add format_string and format_luavZyX2017-09-29
| | | | | | | | | | | | | | | First intended to provide %r functionality like in Python (and also support for %*.*s, but this was not checked), second adds nice table formatting for use in cases similar to screen:snapshot_util().
* | | Merge branch 'master' into s-dash-stdinZyX2017-12-03
|\ \ \ | | |/ | |/|
| * | core dumps: don't use pipe, it does not workBjörn Linse2017-11-25
| |/
| * functests: Add testsZyX2017-06-21
| |
| * Merge branch 'master' into luaviml'/luaZyX2017-05-08
| |\
| | * test: check_cores(): Escape $TMPDIR path. (#6520)Justin M. Keyes2017-04-14
| | | | | | | | | | | | | | | | | | Lua string:match() considers hyphen to be a special char, we want the path to be a literal match. Also remove "./", etc. References #6483
| * | Merge branch 'master' into luaviml'/luaZyX2017-04-10
| |\|
| | * test/check_cores(): Skip workspace-local temp dir. (#6483)Justin M. Keyes2017-04-09
| | | | | | | | | | | | | | | | | | | | | | | | Avoids this error: ./test/helpers.lua:27: cannot open ./Xtest-tmpdir/nvimfqH9dL: No such file or directory stack traceback: ./test/helpers.lua:27: in function 'glob' ./test/helpers.lua:195: in function 'check_cores' ./test/functional/helpers.lua:628: in function <./test/functional/helpers.lua:626>
| | * unittests: Move checking cores to check_child_errZyX2017-04-08
| | |
| * | Merge branch 'master' into luaviml'/luaZyX2017-04-08
| |\|
| | * unittests: Add trace description right to the error messageZyX2017-04-01
| | |
| | * test: Use workspace-local temp directory.Justin M. Keyes2017-03-30
| | | | | | | | | | | | Closes #6291
| | * unittests: Add tv_dict_item_{alloc,free} testsZyX2017-03-29
| | |
| * | functests: Add some testsZyX2017-03-27
| |/
* | tests: Fix repeated_popen_r usage, rename the functionZyX2017-03-19
| |
* | tests: Fix CI failuresZyX2017-03-19
| |
* | functests: Check that `-s` works as expectedZyX2017-03-19
|/
* tests: Allow lfs.attributes to be NULL when traversing FSZyX2017-03-12
|
* unittests: Do not use which, add data to paths.lua.in insteadZyX2017-03-11
|
* unittests: Check core dumps in after_each, like in functestsZyX2017-03-11
|
* test: screen_setup(): Detect spawn failures, usage errors.Justin M. Keyes2017-02-26
|
* ci: Make sure core* is the last component of pathZyX2017-02-14
|
* ci: Better core dump checkingZyX2017-02-14
| | | | | | | | | | | | | | | | - Do not exclude any directories from `find` search, remove dumps before tests instead. - Install `apport` on travis so that linux tests should produce core dumps (based on information from travis-ci/travis-ci#3754, not sure whether it still applies). - Check cores in lua so that one has an idea which test is failing exactly. Do this only 10% of time on linux because traversing the file system is slow. Unit tests are still not touched, though it is what `app` argument in `check_cores` is for. TODO? consider using `find`, it may be faster. Consider retiring `os.execute`, dealing with escaping is bad.
* Merge #5782 'Visual-mode put from @. register'Justin M. Keyes2017-01-22
|\
| * put fixup, esp. ". register close #5709 #5781Matthew Malcomson2017-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note some bugs were judged to have too ugly a fix to solve, tests to demonstrate these problems, and the explanation behind not fixing them are below. describe('register . problems', function() before_each(reset) -- The difficulty here is: The basic requirement is that the text -- inserted is treated as if it were typed in insert mode. This is why -- the paste method is to enter insert mode and enter the ". register -- into readbuf1. -- We can't add a count into the readbuf here because the insert mode -- count is implemented with readbuf2 which is checked for characters -- after readbuf1. -- Hence, the ".gp command (which adds extra characters into readbuf1 -- to emulate leaving the cursor after the text by moving the cursor -- after inserting the text) would insert the motion characters into -- the buffer instead of using them to move after the insert has been -- done. -- I could probably get this working properly with a special flag put -- into start_redo_ins() and set in do_put(), but I think this adds -- much more complexity than fixing this bug justifies. pending('should not change the ". register with ".2p', function() local orig_register = funcs.getreg('.') feed('2".p') eq(orig_register, funcs.getreg('.')) end) describe("cursor positioning after undo and redo with '.'", function() before_each(reset) local function make_cursor_test(macro_string) return function() feed(macro_string) local afterpos = funcs.getcurpos() local orig_string = curbuf_contents() feed('u.') eq(afterpos, funcs.getcurpos()) expect(orig_string) end end -- The difficulty here is: setting the cursor after the end of the -- pasted text is done by adding a motion command to the -- stuffbuffer after the insert. -- Modifying 'redobuff' is done in the code that handles inserting -- text and moving around. -- I could add a special case in ins_esc() that checks for a flag -- set in do_put() to add the motion character to the redo buffer, -- but I think that is starting to get way too convoluted for the -- benefit. pending('should be the same after ".gp and ".gpu.', make_cursor_test('".gp')) -- The difficulty here is: putting forwards is implemented by using -- 'a' instead of 'i' to start insert. -- Undoing with 'u' an insert that began with 'a' leaves the cursor -- where the first character was inserted, not where the cursor was -- when the 'a' was pressed. -- We account for this the first time by saving the cursor position -- in do_put(), but this isn't stored in redobuff for a second time -- around. -- We can't change how such a fundamental action as undo after -- inserting with 'a' behaves, we could add in a special case -- whereby we set a flag in do_put() and read it when entering -- insert mode but this seems like way too much to fix such a minor -- bug. pending('should be the same after ".pu. and ".pu.u.', make_cursor_test('".pu.')) end) end)
* | win: test: enable job_spec.luaJustin M. Keyes2017-01-19
|/ | | | | | | | | | - Default to powershell. - Avoid hardcoded "-c". - Remove ^M character from received lines. - pending_win32(): clear() is unnecessary and it pollutes the tests. Closes #3973 Helped-by: Rui Abreu Ferreira <raf-ep@gmx.com>
* 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
* functests: Check logs in lua codeZyX2016-06-10
It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.