Closed rabirabirara closed 2 years ago
Gave this a run on Mac and I'm seeing errors. Don't have time to investigate now. It might be worth trading away Mac unit tests to get Win/Lin working properly.
Oh, looks like my whole minimap plugin was missing (#138). I got it re-installed, now tests pass on MacOS.
Check list
Description
Fixes #129, partially.
I also ran the tests on my Linux installation, and they had the same problems.
First error: there is no 'max_width' key present in the dictionary. This error was extremely puzzling, given that the code betrays no possible way such an error could occur. So, I added the
max_width
key in, manually, to the value ofworking_width
, and it just seems to work. Needs to be investigated more to actually solve the problem. Error output pictured below:Second: after making that change, I inspected the file that was actually being written to, and found that Vimscript was not actually putting in newlines where they should be. Instead the buffer was all written on one line, displaying
\n
directly as a string rather than as a newline. I changed the script to instead usewritefile()
, which automatically puts newlines in between its string arguments. It seems to work. Old output buffer:Third: Windows was not able to create the folder
/tmp/minimap...
on my machine, so I added a check for the OS type to ensure that Unix users could use/tmp
and Windows users would default to the%TEMP%
environment variable. Error output:In total, these got the tests to work on my Windows and Linux machines alike.
Type of change
Test environment