aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* vim-patch:8.0.0280Justin M. Keyes2017-02-04
| | | | | | | | | | patch 8.0.0280: problem setting multi-byte environment var on MS-Windows Problem: On MS-Windows setting an environment variable with multi-byte strings does not work well. Solution: Use wputenv when possible. (Taro Muraoka, Ken Takata) 7c23d1d9d9cc
* test: helpers.clear(): Set common env vars only if not passed.Justin M. Keyes2017-02-04
|
* build: Do not force busted into front of $PATHJustin M. Keyes2017-02-04
| | | | | | | | | This was a workaround from long ago, but it doesn't seem to be needed anymore. And it breaks the $PATH on the Windows build (AppVeyor CI). After this change python3 (and 2) is correctly detected on AppVeyor CI. References #5946
* win: Append process dir to $PATHJustin M. Keyes2017-02-04
| | | | | | | | This allows executables to be found by :!, system(), and executable() if they live next to ("sibling" to) nvim.exe. This is what gvim on Windows does, and also matches the behavior of Win32 SearchPath(). https://github.com/vim/vim/blob/c4a249a736d40ec54794827ef95804c225d0e38f/src/os_win32.c#L354-L370
* test: executable()Rui Abreu Ferreira2017-02-04
|
* test: Remove whitespace (avoid LF/CRLF discrepancy)Justin M. Keyes2017-02-04
|
* tests: Migrate legacy test 8. #4179Lucas Hoffmann2017-02-03
| | | | | The test produces some "hit enter" prompts and error messages that had to be dealt with by `feed`ing CTRL-L to nvim.
* Merge #2990 'tests: Migrate legacy test 69.'Justin M. Keyes2017-02-03
|\
| * tests: Modernize migrated legacy test 69.Lucas Hoffmann2017-02-03
| |
| * tests: Migrate legacy test 69.Lucas Hoffmann2016-05-23
| |
* | Merge pull request #6050 from jamessan/fix-xclip-testsJames McCoy2017-02-03
|\ \ | | | | | | Fix xclip tests to cleanup on their own
| * | test: Turn printargs_path into a functionJames McCoy2017-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When test/functional/eval/system_spec.lua is run on its own, helpers.os_name() was being called before a session had been created. This caused that describe block to fail. Turning printargs_path into a function delays the call of helpers.os_name() until the test is being run, which ensures a session is available.
| * | test: Make xclip exit after one selection requestJames McCoy2017-02-02
| | | | | | | | | | | | Closes #4900
* | | Merge #5975 from jamessan/execute-with-attrsJustin M. Keyes2017-02-03
|\ \ \ | |/ / |/| | execute: Correctly capture output with highlight attributes
| * | test: execute() + :redirJustin M. Keyes2017-02-01
| | |
| * | execute: Correctly capture output with highlight attributesJames McCoy2017-02-01
| | | | | | | | | | | | Closes #5422
* | | Merge pull request #5869 from hardenedapple/undojoin-curheadJames McCoy2017-02-02
|\ \ \ | |/ / |/| | Don't set `b_u_curhead` in `ex_undojoin()`
| * | Don't set b_u_curhead in ex_undojoin()Matthew Malcomson2017-01-22
| | | | | | | | | | | | | | | vim-patch:8.0.0205 This provides no benefit, and introduces some bugs.
* | | xstrlcat: Allow overlapped pointers. (#6017)Justin M. Keyes2017-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memcpy is not equivalent to memmove (which is used by vim_strcat), this could cause subtle bugs if xstrlcat is used as a replacement for vim_strcat. But vim_strcat is inconsistent: in the `else` branch it uses strcpy, which doesn't allow overlap. Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com> Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
* | | undo: :earlier, g-: Set b_u_seq_cur correctly. (#6016)Matthew Malcomson2017-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously alternate branches were not accounted for properly, with this change g- after an undo to a branch point works. The current sequence number b_u_seq_cur is used in undo_time(), in u_doit() this was calculated by subtracting one from the curhead sequence number. The curhead header entry represents the change that was just undone, so the sequence number we want is that of the change we have moved to. This is the sequence number of the undo head that is the uh_next element of this curhead. That sequence number is not always one less than the curhead sequence number -- there may have been an alternate branch at this point. Instead of subtracting one, we now directly find the sequence number of curhead->uh_next.
* | | eval.c: Fix findfile(), :find, gf in :terminal. #6009Tommy Allen2017-01-31
| | | | | | | | | | | | Closes #4299
* | | defaults: Revert 'mouse=a' (#6022)Justin M. Keyes2017-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This default causes too much confusion for terminal users. Until a better approach is implemented, revert to the traditional default. Better solution would be: - Implement a right-click menu for TUI - Set 'mouse=a' *only* if clipboard is working. Closes #5938
* | | test: Fix broken test.Justin M. Keyes2017-01-24
| | |
* | | Merge #5964 from equalsraf/windows-clipboardJustin M. Keyes2017-01-24
|\ \ \ | | | | | | | | Windows clipboard support
| * | | Enable clipboard provider tests in WindowsRui Abreu Ferreira2017-01-20
| | | |
* | | | ci: XXX: Disable "throttle" test on Travis macOS.Justin M. Keyes2017-01-23
| | | |
* | | | coverity/133845: Negative array index read. (FP)Justin M. Keyes2017-01-23
| |/ / |/| | | | | | | | | | | | | | | | | | | | `find_command(s->ca.cmdchar) >= 0` was established near the start of normal_execute(). And `unshift_special(&s->ca);` "should" not ever result in s->ca.cmdchar containing a multibyte char. So only an assert() is needed here.
* | | test: Avoid Lua closure limit.Justin M. Keyes2017-01-22
| | | | | | | | | | | | | | | Fixes Lua error: > function at line 543 has more than 60 upvalues
* | | 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.