test(main_spec): make "nvim -v" test agnostic to build type

In release builds, the Compilation: line is omitted so the build is reproducible. Since the "fall-back for $VIM" line is always present, check for that instead.
This commit is contained in:
James McCoy 2024-11-26 22:11:20 -05:00
parent 4007c42b77
commit 7781111fef
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -189,9 +189,9 @@ describe('command-line option', function()
it('nvim -v, :version', function() it('nvim -v, :version', function()
matches('Run ":verbose version"', fn.execute(':version')) matches('Run ":verbose version"', fn.execute(':version'))
matches('Compilation: .*Run :checkhealth', fn.execute(':verbose version')) matches('fall%-back for %$VIM: .*Run :checkhealth', fn.execute(':verbose version'))
matches('Run "nvim %-V1 %-v"', fn.system({ nvim_prog_abs(), '-v' })) matches('Run "nvim %-V1 %-v"', fn.system({ nvim_prog_abs(), '-v' }))
matches('Compilation: .*Run :checkhealth', fn.system({ nvim_prog_abs(), '-V1', '-v' })) matches('fall%-back for %$VIM: .*Run :checkhealth', fn.system({ nvim_prog_abs(), '-V1', '-v' }))
end) end)
if is_os('win') then if is_os('win') then