aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/write_spec.lua
Commit message (Collapse)AuthorAge
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* test: introduce skip() #21010dundargoc2022-11-13
| | | | | | | This is essentially a convenience wrapper around the `pending()` function, similar to `skip_fragile()` but more general-purpose. Also remove `pending_win32` function as it can be replaced by `skip(iswin())`.
* feat: ":write ++p" creates parent dirs #20835Victor Blanchard2022-11-06
| | | | | | | | | | | - `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if they do not exist - Note: `:foo ++…` is usually for options. No existing options have a single-char abbreviation (presumably by design), so it's safe to special-case `++p` here. - Same for `writefile(…, 'foo/bar/baz.txt', 'p')` - `BufWriteCmd` can see the ++p flag via `v:cmdarg`. closes #19884
* ci: add cirrus to isCI function to skip tests (#20526)dundargoc2022-10-17
| | | | The environment variable CIRRUS_CI is manually passed to RunTests.cmake as it doesn't get passed when using cmake script mode.
* ci: move BSD jobs from sourcehut to Cirrus CI #19616dundargoc2022-09-08
| | | | | | | | | | | | | | | | | | | dispatch.sr.ht is being deprecated, meaning that using sourcehut CI won't be possible (see https://github.com/neovim/neovim/issues/19609). Since Github Actions doesn't provide any BSD runners an external service is required and Cirrus CI seems like a good replacement for sourcehut. Initially experimented with using FreeBSD and OpenBSD virtual machines in GitHub Actions, but Cirrus has been a much better fit with better performance, logs and overall experience. Failing tests are automatically skipped on FreeBSD regardless if it's on CI or not. Ideally these tests should only be skipped in CI with the help of `isCI` helper function. Unfortunately, the tests don't recognize the environment variable CIRRUS_CI even if it's set manually. This workaround is good enough for the time being, but we might want to only skip tests when using the CI (or even better, fix the failing tests). Closes: https://github.com/neovim/neovim/issues/19609
* 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`.
* tests: fix non-controversial misuse of `pending` (#11247)Daniel Hahler2019-10-18
| | | Ref: https://github.com/neovim/neovim/pull/11184
* fixup: always delete Xfile, fix exit code checkJan Edmund Lazo2018-05-25
| | | | | after_each + os.remove ensures Xfile is deleted after every test. Windows exit code is inconsistent.
* win: test: don't test symlink if not admin userJan Edmund Lazo2018-05-24
|
* win: test: disable non-admin failing testsJan Edmund Lazo2018-05-24
| | | | | | | mkfifo (msysgit) does not work outside of msys2 environment. gzip tests fail on Windows. mklink requires admin privs for file symbolic links so mklink fails.
* Resolve issues mentioned in PR reviewJan Edmund Lazo2018-02-19
|
* test: enable ex_cmds/write_spec.lua in WindowsJan Edmund Lazo2018-02-19
|
* functests: Fix linter errorsZyX2017-04-09
|
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* functests: Test some :write errorsZyX2017-04-03
|
* os_nodetype: open fd with O_NONBLOCK (#5515)Justin M. Keyes2016-10-21
| | | | | Closes #5267 Helped-by: oni-link <knil.ino@gmail.com>
* Mark some functional tests as pending in WindowsRui Abreu Ferreira2016-08-26
|
* test: fix command_count_specBjörn Linse2016-06-23
| | | | The test hit wait_return if x or .x.swp exists in the project root directory.
* test: functional: Remove test_bkc_* files after testingJames McCoy2016-06-15
|
* 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.
* Remove old UNIX ifdef from buf_write()Rui Abreu Ferreira2016-04-28
When backupcopy=auto buf_write assumes backupcopy=yes when the file is a hard/symbolic link. However this check was guarded by a UNIX ifdef. The check itself is portable and the guard can be removed. Added a couple tests to check the behaviour of bkc=auto and bkc=no with a symbolic link. Reported in #4525