2014-10-22 14:53:31 -07:00
|
|
|
-- Tests for errorformat.
|
|
|
|
|
2016-04-23 16:53:11 -07:00
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
2015-11-17 14:44:00 -07:00
|
|
|
local clear = helpers.clear
|
2017-04-08 14:12:26 -07:00
|
|
|
local command, expect = helpers.command, helpers.expect
|
2014-10-22 14:53:31 -07:00
|
|
|
|
|
|
|
describe('errorformat', function()
|
|
|
|
setup(clear)
|
|
|
|
|
|
|
|
it('is working', function()
|
2017-04-08 14:12:26 -07:00
|
|
|
command("set efm=%EEEE%m,%WWWW%m,%+CCCC%.%#,%-GGGG%.%#")
|
|
|
|
command("cgetexpr ['WWWW', 'EEEE', 'CCCC']")
|
|
|
|
command("$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))")
|
|
|
|
command("cgetexpr ['WWWW', 'GGGG', 'EEEE', 'CCCC']")
|
|
|
|
command("$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))")
|
|
|
|
command("cgetexpr ['WWWW', 'GGGG', 'ZZZZ', 'EEEE', 'CCCC', 'YYYY']")
|
|
|
|
command("$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))")
|
2017-09-24 11:42:48 -07:00
|
|
|
|
2014-10-22 14:53:31 -07:00
|
|
|
expect([=[
|
2017-09-24 11:42:48 -07:00
|
|
|
|
2014-10-22 14:53:31 -07:00
|
|
|
[['W', 1], ['E^@CCCC', 1]]
|
|
|
|
[['W', 1], ['E^@CCCC', 1]]
|
|
|
|
[['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]]]=])
|
|
|
|
end)
|
|
|
|
end)
|