aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_autocmd.vim
Commit message (Collapse)AuthorAge
* test/old: use CheckFunction, enable more testsJan Edmund Lazo2021-03-27
| | | | | | Some skipped tests have custom error messages. Use ":CheckFunction" command for standard error message on missing function.
* vim-patch:8.2.0402: setting local instead of global flagJan Edmund Lazo2021-03-23
| | | | | | Problem: Setting local instead of global flag. Solution: Prepend "g:" to "test_is_flaky". https://github.com/vim/vim/commit/30d53e2c11e670845830bdfc29bf8c1615df61a8
* vim-patch:8.2.0400: not all tests using a terminal are in the list of flaky ↵Jan Edmund Lazo2021-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | tests Problem: Not all tests using a terminal are in the list of flaky tests. Solution: Introduce the test_is_flaky flag. https://github.com/vim/vim/commit/3cdcb090a664e182078f7cc0ca3e4e5a94bbb784 Cherry-pick g:test_is_flaky from patch v8.2.0557. Ensure that test_is_flaky variable is set from the global scope.. N/A patches for version.c: vim-patch:8.2.2647: terminal test sometimes hangs Problem: Terminal test sometimes hangs. Solution: Wait for the shell to display a prompt. https://github.com/vim/vim/commit/f4a2ed071447ad4984fad55b9d1671b55140ae1c vim-patch:8.2.2648: terminal resize test sometimes hangs Problem: Terminal resize test sometimes hangs. Solution: Wait for the shell to display a prompt and other output. https://github.com/vim/vim/commit/c54f347d63bcca97ead673d01ac6b59914bb04e5 fixup! vim-patch:8.2.0400: not all tests using a terminal are in the list of flaky tests
* vim-patch:8.2.2596: :doautocmd may confuse scripts listening to WinEnterJan Edmund Lazo2021-03-14
| | | | | | Problem: :doautocmd may confuse scripts listening to WinEnter. Solution: Do the current buffer last. (closes vim/vim#7958) https://github.com/vim/vim/commit/41cd80335cf318c15c8b0139f53ab5e8a02561ef
* vim-patch:8.2.2464: using freed memory if window closed in autocommandJan Edmund Lazo2021-02-03
| | | | | | Problem: Using freed memory if window closed in autocommand. (houyunsong) Solution: Check the window still exists. https://github.com/vim/vim/commit/8ab375706e6712308f8cf7529bcae56684a6f385
* vim-patch:8.2.2420: too many problems with using all autocommand eventsJan Edmund Lazo2021-01-28
| | | | | | | | | Problem: Too many problems with using all autocommand events. Solution: Disallow defining an autocommand for all events. https://github.com/vim/vim/commit/9a046fd08bcae319d39a4dbde2be81decee19013 Delete Test_wipe_cbuffer(). Commit dc5f4a3cc2f7f02e1ff4ec2f67eda4fb73e7d89c should have removed it.
* vim-patch:8.2.2355: stray test failure on AppveyorJan Edmund Lazo2021-01-17
| | | | | | Problem: Stray test failure on Appveyor. Solution: Finish insert command. https://github.com/vim/vim/commit/97c6943e11516711541848e51db3cc2ace25bbb2
* test/old: partial port of patch 8.1.0711Jan Edmund Lazo2020-11-30
| | | | Patch 8.1.0711 is too difficult to merge in 1 commit.
* vim-patch:8.2.0996: using "aucmdwin" in win_gettype() is not idealJan Edmund Lazo2020-11-25
| | | | | | Problem: Using "aucmdwin" in win_gettype() is not ideal. Solution: Rename to "autocmd". https://github.com/vim/vim/commit/40a019f157c549dcdc17c33f082975485567bb06
* vim-patch:8.2.0991: cannot get window type for autocmd and preview windowJan Edmund Lazo2020-11-25
| | | | | | | | | Problem: Cannot get window type for autocmd and preview window. Solution: Add types to win_gettype(). (Yegappan Lakshmanan, closes vim/vim#6277) https://github.com/vim/vim/commit/0fe937fd8616fcd24b1b1ef2ab9f1657615dd22c Cherry-pick test_preview.vim,test_window_cmd.vim changes from patch v8.2.0522.
* vim-patch:8.2.0303: TermChanged test fails in the GUIJan Edmund Lazo2020-11-24
| | | | | | Problem: TermChanged test fails in the GUI. Solution: Skip the test when running the GUI. https://github.com/vim/vim/commit/d28e0b3652067788fcc9c99058b0b6eee7beebee
* vim-patch:8.2.0302: setting 'term' may cause error in TermChanged autocommandJan Edmund Lazo2020-11-24
| | | | | | | Problem: Setting 'term' may cause error in TermChanged autocommand. Solution: Use aucmd_prepbuf() to switch to the buffer where the autocommand is to be executed. (closes vim/vim#5682) https://github.com/vim/vim/commit/0c81d1b11278b2d962aa6fbb4aa974dab97be59d
* vim-patch:8.1.2290: autocommand test failsJan Edmund Lazo2020-11-24
| | | | | | Problem: Autocommand test fails. Solution: Remove 'closeoff' from 'diffopt'. https://github.com/vim/vim/commit/a9aa86ff951b7908b615a61a0e216901b96bc0eb
* vim-patch:8.2.0952: no simple way to interrupt VimJan Edmund Lazo2020-10-22
| | | | | | | Problem: No simple way to interrupt Vim. Solution: Add the SigUSR1 autocommand, triggered by SIGUSR1. (Jacob Hayes, closes vim/vim#1718) https://github.com/vim/vim/commit/be5ee8686a50acf07b823bd293f9c765e533d213
* vim-patch:8.1.2108: cannot close the cmdline window from CmdWinEnterJan Edmund Lazo2020-09-15
| | | | | | Problem: Cannot close the cmdline window from CmdWinEnter. (George Brown) Solution: Reset cmdwin_result earlier. (Christian Brabandt, closes vim/vim#4980) https://github.com/vim/vim/commit/23324a0b35d18c5caac20b1d543ed2d1f762f5b5
* vim-patch:8.2.1369: MS-Windows: autocommand test sometimes failsJan Edmund Lazo2020-08-14
| | | | | | Problem: MS-Windows: autocommand test sometimes fails. Solution: Do not rely on the cat command. https://github.com/vim/vim/commit/14ddd226daa324831e1872c352452f202fd6068c
* vim-patch:8.2.0964: TextYankPost does not provide info about Visual selectionJan Edmund Lazo2020-06-18
| | | | | | Problem: TextYankPost does not provide info about Visual selection. Solution: Add the 'visual' key in v:event. (closes vim/vim#6249) https://github.com/vim/vim/commit/37d1673ce007c46ec2338f3236ae1b7b0324bd25
* Add v:event.visual during `TextYankPost` (#12382)Christian Clason2020-06-03
| | | | | | | | | * propagate visual selection to textyankpost event * adapt tests * add docs * also adapt oldtest
* vim-patch:8.2.0474: cannot use :write when using a plugin with BufWriteCmdJan Edmund Lazo2020-04-13
| | | | | | Problem: Cannot use :write when using a plugin with BufWriteCmd. Solution: Reset BF_NOTEDITED after BufWriteCmd. (closes vim/vim#5807) https://github.com/vim/vim/commit/0fff44152d06e6b662ad4bef172af07a041d2f3f
* vim-patch:8.2.0406: FileReadCmd event not well testedJan Edmund Lazo2020-04-13
| | | | | | Problem: FileReadCmd event not well tested. Solution: Add a test. https://github.com/vim/vim/commit/e32848780cc07c368ba2e088cdefdbb8c3b827c2
* vim-patch:8.1.0851: feedkeys() with "L" does not work properlyJan Edmund Lazo2020-01-05
| | | | | | | Problem: feedkeys() with "L" does not work properly. Solution: Do not set typebuf_was_filled when using "L". (Ozaki Kiichi, closes vim/vim#3885) https://github.com/vim/vim/commit/8d4ce56a19ed14d13332f94ad592fff2d9a715d5
* vim-patch:8.1.1362: code and data in tests can be hard to readJurica Bradaric2019-10-07
| | | | | | Problem: Code and data in tests can be hard to read. Solution: Use the new heredoc style. (Yegappan Lakshmanan, closes vim/vim#4400) https://github.com/vim/vim/commit/c79745a82faeb5a6058e915ca49a4c69fa60ea01
* vim-patch:8.0.1771: in tests, when WaitFor() fails it doesn't say whyJan Edmund Lazo2019-09-21
| | | | | | Problem: In tests, when WaitFor() fails it doesn't say why. (James McCoy) Solution: Add WaitForAssert(), which produces an assert error when it fails. https://github.com/vim/vim/commit/50182fa84e20a0547f3e2bd6683ef799fcd27855
* vim-patch:8.0.1653: screen dump is made too soon (#10911)Jan Edmund Lazo2019-09-02
| | | | | Problem: Screen dump is made too soon. Solution: Wait until the ruler is displayed. (Ozaki Kiichi, closes vim/vim#2755) https://github.com/vim/vim/commit/1834d37396e046ccbc4aa2678ba16a38197da6b4
* tests: use runtime from build for doc/tags with :help (#10479)Daniel Hahler2019-08-28
| | | | | | | | | | | | This is better practice in general, and allows to remove the "helptags ALL" hacks. Ref: https://github.com/neovim/neovim/issues/8824 Ref: https://github.com/neovim/neovim/commit/f1b67c3453c * Makefile: fix dependencies with regard to helptags - use the file as the main target to avoid unnecessary triggering - use "make oldtest" on Travis to ensure it gets built
* free_buffer: rework b:changedtick handling #9163Justin M. Keyes2019-08-12
| | | | | | | | | | | | | | | | | | | | - Re-enable Test_BufLeave_Wipe. 66f5e5c7d7ce This is my (probably-wrong) application of Zyx's suggestion in #9163: > free_buffer_stuff() already removes changedtick. It is better to > make `free_options` a flag variable and avoid calling > buf_init_changedtick() based on some flag there: current workflow > looks weird as it first removes `b:changedtick`, then re-adds it > by calling buf_init_changedtick(), then remove again. > Also based on my understanding it looks logical to not remove > `b:changedtick`, but to *replace* it with something allocated if > needed based on examining reference count before calling > `unref_var_dict`. Because now you have key disappearing from > dictionary for no good reason. Patch-By: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
* vim-patch:8.1.1311: test: abort autocmd with exception #10692Jan Edmund Lazo2019-08-05
| | | | | | Problem: Aborting an autocmd with an exception is not tested. Solution: Add a test. Also shows how to abort a command by throwing an exception. https://github.com/vim/vim/commit/23b5139234a79567097ca73aba15ea134381b934
* vim-patch:8.1.1546: in some tests 'tags' is set but not restoredDaniel Hahler2019-06-16
| | | | | | Problem: In some tests 'tags' is set but not restored. (Daniel Hahler) Solution: Restore 'tags'. (closes vim/vim#4535) https://github.com/vim/vim/commit/0331faf71200a274377e1569fcda4f00c9cf3e2a
* vim-patch:8.1.0813: FileChangedShell not sufficiently testedDaniel Hahler2019-06-08
| | | | | | Problem: FileChangedShell not sufficiently tested. Solution: Add a more comprehensive test case. https://github.com/vim/vim/commit/0566e891f73897486de3f0ac194795eeca0097d6
* vim-patch:8.1.1325: cannot build with +eval but without +channel and +timersJan Edmund Lazo2019-05-18
| | | | | | | Problem: Cannot build with +eval but without +channel and +timers. (John Marriott) Solution: Adjust #ifdef for get_callback(). https://github.com/vim/vim/commit/97b0075b0d733cc58c29247b09e7887b9991d7bf
* vim-patch:8.1.1205: BufReadPre may move the cursor #9980Justin M. Keyes2019-05-08
| | | | | | | Problem: A BufReadPre autocommand may cause the cursor to move. Solution: Restore the cursor position after executing the autocommand, unless the autocommand moved it. (Christian Brabandt, closes vim/vim#4302, closes vim/vim#4294) https://github.com/vim/vim/commit/a68e59590905da9b4448ff1fcac929ad1a18da9e
* vim-patch:8.1.0613: when executing an insecure function the secure flag is stuckJan Edmund Lazo2019-05-05
| | | | | | | Problem: When executing an insecure function the secure flag is stuck. (Gabriel Barta) Solution: Restore "secure" instead of decrementing it. (closes vim/vim#3705) https://github.com/vim/vim/commit/48f377a476e4a3312aa0e3535aba170484b59483
* test/old: remove test.out filesJustin M. Keyes2019-04-27
| | | | | | | Do this for new-style tests too, because they run after the old-style tests which don't clean up their temp files. Reverts ebd251c
* oldtests: pass Test_ReadWrite_Autocmds()Jan Edmund Lazo2019-04-26
|
* vim-patch:8.1.1203: some autocmd tests are old styleJan Edmund Lazo2019-04-26
| | | | | | Problem: Some autocmd tests are old style. Solution: Turn the tests into new style. (Yegappan Lakshmanan, closes vim/vim#4295) https://github.com/vim/vim/commit/69ea587289b03e23a9fb96adffd6e8173cbc5896
* vim-patch:8.1.0837: timer interrupting cursorhold and mapping not testedJan Edmund Lazo2019-04-26
| | | | | | Problem: Timer interrupting cursorhold and mapping not tested. Solution: Add tests with timers. (Ozaki Kiichi, closes vim/vim#3871) https://github.com/vim/vim/commit/26d982185e21398738a9c688429c0a1840d7c9c3
* vim-patch:8.1.1113: making an autocommand trigger once is not so easyJustin M. Keyes2019-04-06
| | | | | | | Problem: Making an autocommand trigger once is not so easy. Solution: Add the ++once argument. Also add ++nested as an alias for "nested". (Justin M. Keyes, closes vim/vim#4100) https://github.com/vim/vim/commit/eb93f3f0e2b2ae65c5c3f55be3e62d64e3066f35
* TextYankPost: add v:event["inclusive"] #9717Justin M. Keyes2019-03-13
|
* tests: load-adjust timer tests (oldtest)Marco Hinz2019-01-17
|
* vim-patch:8.0.1748: CmdlineEnter command uses backslash instead of slashJan Edmund Lazo2018-12-12
| | | | | | Problem: CmdlineEnter command uses backslash instead of slash. Solution: Don't treat the character as a file name. (closes vim/vim#2837) https://github.com/vim/vim/commit/a4baf5b32519855bb176a7aa0e9397c137ca890a
* vim-patch:8.0.1445: cannot act on edits in the command lineBjörn Linse2018-12-12
| | | | | | | | Problem: Cannot act on edits in the command line. Solution: Add the CmdlineChanged autocommand event. (xtal8, closes vim/vim#2603, closes vim/vim#2524) https://github.com/vim/vim/commit/153b704e20f9c269450a7d3ea8cafcf942579ab7
* test/old: Test_BufReadCmdHelp: generate helptagsJustin M. Keyes2018-11-01
| | | | | | | | | Generate helptags before :help. This only failed in the TSAN build because other builds run the Lua tests first, which generate the helptags. closes #8824
* vim-patch:8.0.1633: a TextChanged autocmd triggers when it is definedJan Edmund Lazo2018-08-15
| | | | | | | | Problem: A TextChanged autocmd triggers when it is defined after creating a buffer. Solution: Set b_last_changedtick when opening a buffer. (Hirohito Highlight, closes vim/vim#2742) https://github.com/vim/vim/commit/8c64a36e40b8746404f7151abe6849393396af10
* vim-patch:8.0.1413: accessing freed memory in :cbufferJan Edmund Lazo2018-08-15
| | | | | | Problem: Accessing freed memory in :cbuffer. Solution: Get quickfix list after executing autocmds. (closes vim/vim#2470) https://github.com/vim/vim/commit/aaf6e43b7a99cedb89d73ba749a46f7a0f16bbb6
* oldtests: finish port of 8.0.1224Jan Edmund Lazo2018-08-15
|
* vim-patch:8.0.1218: writing to freed memory in autocmdJan Edmund Lazo2018-08-15
| | | | | | Problem: Writing to freed memory in autocmd. Solution: Make a copy of the tag line. (Dominique Pelle, closes vim/vim#2245) https://github.com/vim/vim/commit/8d84ff1a3c8cfe59399d3f675ec080066582fdb6
* vim-patch:8.1.0256: using setline() in TextChangedI splits undoJason Felice2018-08-09
| | | | | | | | | | | | | | Problem: Using setline() in TextChangedI splits undo. Solution: Use another solution for undo not working properly. https://github.com/vim/vim/commit/9fa9506853516c82851baec643aa47458cb8b3bc This deviates from Vim in the handling of the CursorHoldI event. In Vim, any buffer changes are merged into the insert. In Neovim, CursorHoldI is handled via the multiqueue, and the point at which the cursor hold is implemented (in input.c) doesn't know enough about it. Making all queued events merge into the insert seems more wronger since changes by other asynchronous events really should be separately undoable.
* vim-patch:8.1.0245: calling setline() in TextChangedI autocmd breaks undoJason Felice2018-08-09
| | | | | | | Problem: Calling setline() in TextChangedI autocmd breaks undo. (Jason Felice) Solution: Don't save lines for undo when already saved. (closes vim/vim#3291) https://github.com/vim/vim/commit/91d2e783b41ca900bc603b3cb5e083c8a4a33170
* vim-patch:8.0.1253: still too many old style testsJan Edmund Lazo2018-07-06
| | | | | | | | | | Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes vim/vim#2272) https://github.com/vim/vim/commit/430dc5d360166ca5bb6a73f2c87ae53e09282ecb Skip Test_tag_file_encoding. 083_tag_search_with_file_encoding_spec.lua handles the same test case.
* test/old: remove `abort` from test declarationJustin M. Keyes2018-05-19
| | | | | No idea why this was added, it isn't in the Vim patch. The Vim (oldtest) test-runner doesn't work with `Test_` functions marked as `abort`.