aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada
Commit message (Collapse)AuthorAge
* refactor(tests): remove redir_exec #15718Justin M. Keyes2021-09-19
| | | | | | | | | | | Problem - `redir_exec` is obsolete, but it keeps getting used in new tests because people copy existing tests. - Disadvantages of `redir_exec`: - Captures extra junk before the actual error/message that we _want_ to test. - Does not fail on error, unlike e.g. `command()`. Solution - Use new functions like `nvim_exec` and `pcall_err`.
* feat(shada): restore Blob globals properlySean Dewar2021-09-15
| | | | | | | | | | | As Strings and Blobs are encoded as msgpack BINs, the current ShaDa implementation will restore global Blob variables as Strings (or msgpack special dicts if they contain NULs). Encode an additional element with Blob globals to differentiate them from Strings so that we can restore them with the correct type. Adjust variables_spec.lua's autotest() to also check for proper type.
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* shada: fix failed assertion on exit (#12692)erw72020-07-31
| | | | | | If set the number of history saves is 0, assertions fail when inserting an entry on exit. Dont insert an entry when the number of saves is 0 fixes the issue. fixes #11497
* vim-patch:8.2.0920: writing viminfo fails with a circular referenceerw72020-06-09
| | | | | | Problem: Writing viminfo fails with a circular reference. Solution: Use copyID to detect the cycle. (closes vim/vim#6217) https://github.com/vim/vim/commit/5b157fe2edfdce5f77080aeac2b4a03f39eb1c1a
* shada: fix write E5004 error on exiterw72020-06-08
| | | | | Fix the problem of failing to write shada when the global variable contains Funcref or Partial.
* shada: initialize jumplist before search pattern (#10964)Abdelhakeem Osama2019-09-07
| | | | | | | Since 8b8ecf4, the shada module loads files in the jumplist to properly clear duplicates. This can trigger some autocommands, which in turn saves and restores search and substitute patterns, freeing the previous strings in "spats" which are held in "wms" as well (heap-use-after-free). To avoid this, initialize the jumplist in "wms" before search patterns.
* test: Minimize shada/helpers.lua #10728Justin M. Keyes2019-08-09
|
* jumplist: avoid extra tail entry #9805Abdelhakeem Osama2019-04-02
| | | fixes #9775
* startup: always wait for UI with --embed, unless --headless also is suppliedBjörn Linse2018-09-22
|
* functests: Use proper path in `eq()`ZyX2018-04-02
|
* shada: Fix some memory leaks and completely ignore numbered mark namesZyX2018-04-01
| | | | | | | | | | | | | Problems: - In two places in shada_read_when_writing() memory just was not freed. Both places were verified to cause test failures. - Numbered marks got assigned incorrect (off-by-one compared to position in the array) numbers in replace_numbered_mark. - It was possible to have non-continuously populated array of numbered marks which messed up code for merging them. (Note about tests: marks with additional data are always compared different when merging, that caused some confusion regarding why test did not work the way I expected.)
* functests: Add test for merging with file with only numeric markZyX2018-04-01
| | | Known to cause memory leak, but not an expected crash.
* functests: Fix existing functional testsZyX2018-03-27
|
* tests: stderr output contains `cp` noiseJustin M. Keyes2018-01-05
| | | | closes #7811
* mark: Make sure that jumplist item will not have zero lnumZyX2017-12-24
| | | | Fixes #7169
* test/shada: fixup for Windows backslashes #7287Ignas Anikevicius2017-10-02
|
* shada: Make sure that code does not attempt to read too long itemsZyX2017-07-04
| | | Fixes #6957
* test: Fix and add cases for unnamed registerAdnoC2017-05-31
| | | | | | | | Also: Add ru to shada tests with all keys Add test for unset unnamed and register 0
* eval/shada: Add testing for unnamed register with setreg and startupAdnoC2017-05-31
|
* shada: Remember whether "0 or "1 was the unnamed registerJames McCoy2017-05-24
| | | | Ref #4645
* eval: Fix len argument to xstrlcatZyX2017-03-29
|
* 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.
* shada: Save current cursor position before saving jumpsZyX2017-01-04
|
* shada: Respect the optional buffer count for shada-%James McCoy2016-12-12
| | | | Closes #5759
* build: Target luacheck HEAD.Justin M. Keyes2016-11-17
| | | | | | | | | | | | https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606 > If you really want to use bleeding-edge version you should get the > rockspec from master branch, not a fixed commit ... > The correct way to install from a specific commit is cloning that > commit and running "luarocks make" from project directory. The reason > is that running "install" or "build" on an scm rockspec fetches > sources from master but uses build description from the rockspec > itself, which may be outdated.
* Bump all nvim-specific error codes above E5000James McCoy2016-11-15
| | | | | | | | | | In order to not conflict with new error codes that Vim adds, all Neovim error codes should be above 5000. The three existing sub-5000 error codes (E926, E951, and E952) are now E50003, E5004, and E5005 respectively. E953 was removed in 6167ce6df2753d5474ad49aea19f5957128ab015, so just remove it from the help.
* encoding: update testsBjörn Linse2016-11-05
| | | | | | | Change shada reencoding tests to check for correct handling of UTF-8 and binary strings. Delete enc=latin1 json tests.
* test: Fix shada/marks_spec.lua failureJames McCoy2016-10-28
| | | | | | The 'dump and read back mark " from a closed tab' test needs to actually create a second tab. Since it wasn't doing so, the 'q!' command caused nvim to exit and the subsequent 'qall' command fails.
* vim-patch:7.4.2212Grzegorz Milka2016-10-22
| | | | | | | | Problem: Mark " is not set when closing a window in another tab. (Guraga) Solution: Check all tabs for the window to be valid. (based on patch by Hirohito Higashi, closes vim/vim#974) https://github.com/vim/vim/commit/e59215c7dcae17b03daf39517560cfaa03314f5a
* shada: Fix non-writeable ShaDa directory handlingZyX2016-09-04
| | | | | | | | | | | | | Before this change, nvim -i /etc/shada segfaults on exit if the file does not exist and user does not have permissions to create the file at /etc/shada. Closes #5296 Reported in #5277 https://github.com/neovim/neovim/issues/5277#issuecomment-243937255
* api: consistently use nvim_ prefix and update documentationBjörn Linse2016-08-31
|
* functionaltest: Create lua helper for os.tmpname()Rui Abreu Ferreira2016-08-31
| | | | | | | | | | | | | | | In Windows Lua's os.tmpname() returns relative paths starting with \s, prepend them with $TEMP to generate a valid path. In OS X os.tmpname() returns paths in '/tmp' but they should be in '/private/tmp'. We cannot use os_name() for platform detection because some tests use tempname() before nvim is spawned, instead use one of the following: 1. Set SYSTEM_NAME environment variable before calling the tests, it is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows') 2. Call uname -s 3. Assume windows
* Mark some functional tests as pending in WindowsRui Abreu Ferreira2016-08-26
|
* 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.
* eval: let getreg() return valid list for an undefined registerBjörn Linse2016-04-21
| | | | | vim-patch:7.4.1755 this prevents a crash when the list is used in setreg() later
* shada: Make sure that NIL and EXT values can also be parsed backZyX2016-04-18
| | | | | | | | | Note: currently they are both *dumped*, but parsing them produces an error. This is inappropriate: variables should either be skipped with error message when dumping or should be read back properly. It also appears that I did not have test for “has wrong variable value type” error, so nothing got removed from errors_spec.
* Update lua client to 0.0.1-24Thiago de Arruda2016-04-13
| | | | | The new version of the lua client uses libmpack as a backend, and some test scripts had to be updated to reflect that.
* Synchronize shada reset helper with other functional testsThiago de Arruda2016-04-11
|
* test: shada_spec: resolve symlinkJun T2016-02-12
| | | | | | If the build directory path has symlinks in it, 'make functionaltest' fails at shada_spec.lua:177 because readme_fname has symlink but nvim resolves the symlink when writing it into the shada file.
* functests: Update testsZyX2016-01-07
|
* shada: Continue dumping when variables failed to dumpZyX2015-12-18
| | | | Closes #3721
* Merge pull request #3724 from ZyX-I/fix-3635Justin M. Keyes2015-11-27
|\ | | | | shada: Do not save unlisted and quickfix buffers
| * shada: Do not save unlisted and quickfix buffersZyX2015-11-23
| | | | | | Fixes #3635
* | Merge pull request #3581 from ZyX-I/fix-shadaFelipe Morales2015-11-23
|\ \ | | | | | | Store last search direction when writing ShaDa files
| * | shada: Also store last search directionZyX2015-11-23
| |/ | | | | | | | | | | | | | | | | | | Note: it looks like viminfo files do not store search direction intentionally. After reading viminfo file search direction was considered to be “forward”. Note 2: all files created on earlier Neovim version will automatically receive “forward” direction. Fixes #3580
* / test/functional: clean up according to luacheck (part 1)Marco Hinz2015-11-23
|/
* Sort oldfiles in the marks_spec tests to avoid random ordering errors.John Szakmeister2015-11-06
| | | | | According to @ZyX-I in #3594, ordering is not important so let's use @tarruda's fix by sorting the results.
* functests: Add test to check expected behaviour (failing)ZyX2015-10-23
|
* shada: Fix memory leak and double free when setting both &vi and &sdZyX2015-10-08
|