There are two major problems when supplying `opts.stream`
1. curl methods do produce junk in temp folder. Curl command dumps
headers to some file in tmp folder and cleans it up only in the
`parse.response()` method. This method is not called if
`opts.stream` is set
2. there is no way to access response code, because it is also writen to
the headers dump file in temp folder.
This commit address both of those problems by setting `job.on_exit`
callback even if `opts.stream` is specified.
When I ran this code, I got an error below.
```lua
async.util.block_on(function()
async.util.sleep(4000)
end)
print "done"
```
```bash
E5113: Error while calling lua chunk: /tmp/hoge.lua:4: bad argument #1 to 'block_on' (table expected, got nil)
stack traceback:
[C]: in function 'block_on'
/tmp/hoge.lua:4: in main chunk
```
This means the func is terminated by `vim.wait` and the variable `ret`
is still `nil`. So `unpack(ret)` raises an error.
This PR fixes this bug by setting a default value for `ret`.
* Resolved invalid escape sequence error caused by Windows backslash in filepaths.
* PlenaryBustedDirectory now works with no path issues, and the PlenaryTestFile keymap now properly tests only the file.
* Refactored test running and floating window logic out into _test_paths and made test_directory only responsible for passing a list of test files to the new _test_paths function. Finally added a test_file function which calls _test_paths with only one path: the current file.
* Update fix to be unique to Windows machines. For some reason, Path:absolute behaves differently on Linux.
* fix(vararg.rotate): edge cases and nil arguments
- zero argument rotation returned one value (a global by the name A0)
- the generic fallback dropped the first argument and trailing nils
* fix: functional.partial & fun.bind
These only worked for binding exactly one parameter.
* Include generated rotate.lua file in linting
neovim 0.10 has bumped up LuaJIT version, which makes plenary.profile
fail to work due to the "LuaJIT core/library version mismatch" error.
We can have an allowed range for `jit.version_num` as 20100~20199.
FYI, `require('jit')` reports:
nvim-0.9.1:
version = "LuaJIT 2.1.0-beta3",
version_num = 20100
nvim-0.10.x (HEAD version as of today, an example):
version = "LuaJIT 2.1.1693268511",
version_num = 20199
* fix#491 where before_each and after_each execute in unpredictable
order. Just changed the tables that store these functions to be indexed by the
parent `describe`s index in the current_describe table which uses
sequential integers. Then in the run_each function where these
functions get executed, iterating thru them usning ipairs instead of
pairs.
Looks like vim is doing regex string parsing when using `expand` so when
using have paths that represent some invalid regex, an error is thrown.
In this particular case, the invalid regex came in the form of reverse
range: `:expand("[z-a]")` will error out
This looks to be very similar to #465
I have been encountering the below error when the filepath is an integer.
```
Error executing vim.schedule lua callback: ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: Error executing lua: ...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:123: attempt to index local 'filepath' (a number value)
stack traceback:
...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:123: in function 'detect_from_name'
...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:167: in function 'detect'
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:434: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428>
[C]: in function 'nvim_buf_call'
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:422>
stack traceback:
[C]: in function 'nvim_buf_call'
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:422>
```