diff options
| author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2025-10-23 17:07:00 +0300 |
|---|---|---|
| committer | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2025-10-23 17:38:35 +0300 |
| commit | c732133efead31f2ff23d5f4ceac639505add6e8 (patch) | |
| tree | 6c5f8e315d53f826c439e8c095176d72f89655f0 /runtime/lua/vim/_extui/shared.lua | |
| parent | 459cffc55f7651a33b638028680255a775dded3d (diff) | |
| download | rneovim-c732133efead31f2ff23d5f4ceac639505add6e8.tar.gz rneovim-c732133efead31f2ff23d5f4ceac639505add6e8.tar.bz2 rneovim-c732133efead31f2ff23d5f4ceac639505add6e8.zip | |
test(pack): refactor 'pack_spec.lua' with better code
Problem: 'pack_spec.lua' test file's code can be improved.
Solution: Refactor some aspects. In particular:
- Rewrite `find_in_log` for finding event data in event log into a
generator function that from log list returns a finder function.
This allows it to take less arguments and be more concise.
- Consistently use `local function f()` instead of
`local f = function()`.
- Prefer to use `fn.readblob()` instead of `fn.readfile()` to assert
text from a file.
- Use `([[...]]):format()` approach to testing file content (instead
of array of strings). Should improve readability.
- Universally prefer using "assert" to mean "check if certain
expectation about the process holds up" (instead of occasional
"validate").
Diffstat (limited to 'runtime/lua/vim/_extui/shared.lua')
0 files changed, 0 insertions, 0 deletions