aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | | 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)
* | | | test: expand_env_esc()Justin M. Keyes2017-01-21
| | | | | | | | | | | | | | | | | | | | | | | | Test expand_env_esc() using the same parameters reported in #3725. Closes #3725
* | | | win: test: Enable jobstart() 'shell' test. (#5983)Justin M. Keyes2017-01-21
| | | |
* | | | tui: Enable mode-sensitive cursor by default.Justin M. Keyes2017-01-20
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also give NVIM_TUI_ENABLE_CURSOR_SHAPE more granularity: 0 = do not change cursor shape 1 = non-blinking ("steady") cursor with mode-sensitive shape 2 = blinking cursor with mode-sensitive shape Note: blink state is not changed for Konsole, instead user's terminal preference makes the decision. (Can't do that for xterm-likes, DECSCUSR forces us to choose blink-state.) This is a temporary step until the TUI respects 'guicursor' Ref: https://github.com/neovim/neovim/issues/2583#issuecomment-272988384
* | | test/timer_spec.lua: Relax expected count.Justin M. Keyes2017-01-19
| | | | | | | | | | | | | | | | | | Test sometimes fails on AppVeyor (Windows). 300/50=6, but there could be environment factors that miss the timer interval on the "edges". timer_start() does not have such a hard requirement.
* | | ci: Disable "CTRL-C interrupts :global" testJustin M. Keyes2017-01-19
| | | | | | | | | | | | | | | This test is low-value, high-cost. It's slow, and sometimes crashes luajit. It's still enabled on local runs, that's good enough.
* | | win: test: XXX: Disable some tests.Justin M. Keyes2017-01-19
| | |
* | | win: fix warningsJustin M. Keyes2017-01-19
| | |
* | | 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>
* | | Merge pull request #5963 from jamessan/screen-expect-clarityJames McCoy2017-01-18
|\ \ \ | | | | | | | | test: screen: Assert expected row count matches configured screen height
| * | | test: screen_basic: Re-enable min width/height testJames McCoy2017-01-18
| | | |
| * | | test: screen: Assert expected row count matches configured screen heightJames McCoy2017-01-18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is a difference in expected vs. actual row count, the user gets a confusing message about being unable to string concat a nil value from screen:expect. This assert makes it clear what the problem is rather than requiring people to dig through the code of screen:expect to determine what happened.
* / / test: nvim_ui_attach() with huge dimensions. (#5974)Justin M. Keyes2017-01-18
|/ / | | | | | | | | | | | | Also: - Attempt to constrain wall-of-text in screen.lua. - Windows: Enable screen_basic_spec.lua Closes #2180
* | DirChanged: set <amatch> (#5961)Justin M. Keyes2017-01-17
| | | | | | | | | | Also: - test that DirChanged is not recursive - fix 'not trigger if :cd fails' test on Windows
* | Merge #5928 'New event: DirChanged'Marco Hinz2017-01-16
|\ \
| * | Add autocmd/dirchanged_spec.luaMarco Hinz2017-01-13
| | |
* | | Merge #5918 'vim-patch: 7.4.2006, 7.4.2075, 7.4.2077, 7.4.2117, 7.4.2300, ↵Justin M. Keyes2017-01-16
|\ \ \ | | | | | | | | | | | | 7.4.2313, 7.4.2314'.
| * | | fix test failurelonerover2017-01-09
| | | |
* | | | setpos(): Set lowercase mark in other buffers (#5753)Matthew Malcomson2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also make setpos("'A", [999, 1, 1, 0]) fail, i.e. return -1 (assuming there is no buffer 999). Fixes #5713 Background: `:help setpos()` mentions an argument `"bufnum"` that determines the buffer a mark should be put in. This argument is respected for uppercase marks, but not for lowercase marks. This is reasonable (though I personally would like `setpos()` to be able to set marks in other buffers), but the help doesn't mention this anywhere. It's also strange that attempting to change buffers with `setpos('.', [bufnr('#'), 1, 1, 0])` alerts the user that having a different buffer is an error, while attempting to set a mark with `setpos("'d", [bufnr('#'), 1, 1, 0])` doesn't tell the user that the `"bufnum"` argument is an error.
* | | | job: Consume content from rbuffer before invoking the callback againJames McCoy2017-01-14
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | While a job callback is active, it may be invoked again. Since the data handled by the first invocation of the callback hasn't been marked as consumed, the subsequent invocation will see the same data. Reported-by: Daniel Hahler Patch-by: oni-link Closes #5889
* | | Merge #5933 from justinmk/dir-bufenterJustin M. Keyes2017-01-13
|\ \ \ | | | | | | | | open_buffer(): Raise `BufEnter` for directories.
| * | | Windows: enable more testsJustin M. Keyes2017-01-13
| | | |
| * | | test: BufEnterJustin M. Keyes2017-01-13
| | | |
* | | | eval: Remove dictwatcher from watchers queue before freeing itJames McCoy2017-01-12
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a use-after-free noticed by ASAN which would occur when a dictwatcher was still active on a dictionary when the dictionary was freed. fun! MakeWatch() let d = {'foo': 'bar'} call dictwatcheradd(d, 'foo', function('...')) endfun Patch-by: oni-link Closes #5930
* | | inccommand: Preview :sub commands only after the delimiter is presentJames McCoy2017-01-11
| | | | | | | | | | | | Closes #5888
* | | inccommand: Suppress error reporting when previewing commandsJames McCoy2017-01-11
| | | | | | | | | | | | Closes #5912
* | | test: system([...]): v:shell_errorJustin M. Keyes2017-01-11
| | |
* | | system([...]): Set v:shell_error=-1 if not executable.Rui Abreu Ferreira2017-01-11
| | | | | | | | | | | | | | | | | | | | | | | | Do _not_ set v:shell_error on parameter validation error. system([...]) does not invoke a shell, so this change is somewhat questionable. But `:help v:shell_error` is sufficiently vague to allow -1 in this case.
* | | test: system([...])Rui Abreu Ferreira2017-01-11
| | |
* | | vim-patch:7.4.2008James McCoy2017-01-10
| | | | | | | | | | | | | | | | | | | | | | | | Problem: evalcmd() has a confusing name. Solution: Rename to execute(). Make silent optional. Support a list of commands. https://github.com/vim/vim/commit/79815f1ec77406f2f21a618c053e5793b597db7a
* | | test: Windows: Re-enable shada functional testsRui Abreu Ferreira2017-01-08
| | | | | | | | | | | | | | | One of the tests remains disabled until we figure out the expected behaviour of mkdir() on Windows when `prot` is passed.
* | | XDG: Windows: resolve $LOCALAPPDATA, $TEMP (#5278)Rui Abreu Ferreira2017-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After #4964 environment variables in the XDG "fallback" table are no longer expanded. Fallback to correctly expanded $LOCALAPPDATA, $TEMP. If that fails (unlikely), fallback to hard-coded paths (e.g. ~/AppData/Local). Closes #5255
* | | Merge #5079 from ZyX-I/shada-save-current-posJustin M. Keyes2017-01-07
|\ \ \ | | | | | | | | shada: Save current cursor position before saving jumps
| * | | shada: Save current cursor position before saving jumpsZyX2017-01-04
| | | |
* | | | unittest: Fix linter errorsZyX2017-01-07
| | | |
* | | | unittest,memory: Fix testsZyX2017-01-07
| | | |
* | | | unittest: Add failing test for freeing dictionaries in a listZyX2017-01-07
| | | |
* | | | unittest: Add dict_items functionZyX2017-01-07
| | | |
* | | | unittest: Add failing test of freeing listsZyX2017-01-07
| | | |
* | | | unittest: Allow mocking allocator callsZyX2017-01-07
| |/ / |/| |
* | | Merge pull request #5826 from ZyX-I/fix-typval_encodeJames McCoy2017-01-06
|\ \ \ | | | | | | | | Refactor eval/typval_encode.h
| * | | functests: Add tests for new fixesZyX2017-01-06
| | | |
| * | | unittests: Fix linter errorsZyX2017-01-03
| | | |
| * | | tests: Add tests for partials dumpingZyX2017-01-03
| | | | | | | | | | | | | | | | | | | | Also fixed dumping of partials by encode_vim_to_object and added code which is able to work with partials and dictionaries to test/unit/eval/helpers.lua (mostly copied from #5119, except for partials handling).
| * | | eval/typval_encode: Fix infinite loopZyX2017-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Occurs when trying to dump a partial with attached self dictionary which references that partial. “Infinite” loop should normally result in Neovim killed by OOM killer. Also moved the place when partials are unreferenced by clear_tv: from …FUNC_START to …FUNC_END.
* | | | path.c: `vim_FullName()`: Fix heap overflow #5737nfnty2017-01-05
| | | | | | | | | | | | | | | | | | | | | | | | - Clarify documentation. - Return `FAIL` and truncate if `fname` is too long. - Add tests.
* | | | Merge #5874 from ZyX-I/fix-5482Justin M. Keyes2017-01-04
|\ \ \ \ | | | | | | | | | | Fix plugin which opens ShaDa files
| * | | | plugin/shada: Handle NUL characters with intchar correctlyZyX2017-01-04
| | | | | | | | | | | | | | | Fixes #5482
| * | | | plugin/msgpack: Support character constants like '\0'ZyX2017-01-04
| | |/ / | |/| |