diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-11-06 11:05:27 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-11-06 11:37:33 +0000 |
commit | f7e32fb6e626ab198bf401765236783890f3a0d6 (patch) | |
tree | aaff00346ed6e6c2bc6574268a014efbc8b136dd /test/functional/lua/system_spec.lua | |
parent | f8b193a01e7f98a6fff2d0fdc04b697139ddc3fc (diff) | |
download | rneovim-f7e32fb6e626ab198bf401765236783890f3a0d6.tar.gz rneovim-f7e32fb6e626ab198bf401765236783890f3a0d6.tar.bz2 rneovim-f7e32fb6e626ab198bf401765236783890f3a0d6.zip |
fix(test): better management of tmpfiles
Problem:
When tmpdir is local. The returned values from tmpname may already
exist. This can cause problems for tests which pass `create=false` as
they may require the file to not exist yet.
Solution:
When creating tmp names, always remove it to ensure it doesn't exist,
and optionally open it if `create~=false`
Additionally refactor the tmpname code and flattrn some functions into
constants.
Also while debugging this issue. It was discovered that `exec_lua()`
doesn't report error messages properly. This has been fixed.
Diffstat (limited to 'test/functional/lua/system_spec.lua')
0 files changed, 0 insertions, 0 deletions