robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1-- Tests for errorformat. 2 3local n =require ( 'test.functional.testnvim' )() 4local t =require ( 'test.testutil' ) 5 6local describe , it , setup =t . describe , t . it , t . setup 7local clear =n . clear 8local command , expect =n . command , n . expect 9 10describe ( 'errorformat' , function () 11setup ( clear ) 12 13it ( 'is working' , function () 14command ( 'set efm=%EEEE%m,%WWWW%m,%+CCCC%.%#,%-GGGG%.%#' ) 15command ( "cgetexpr ['WWWW', 'EEEE', 'CCCC']" ) 16command ( "$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))" ) 17command ( "cgetexpr ['WWWW', 'GGGG', 'EEEE', 'CCCC']" ) 18command ( "$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))" ) 19command ( "cgetexpr ['WWWW', 'GGGG', 'ZZZZ', 'EEEE', 'CCCC', 'YYYY']" ) 20command ( "$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))" ) 21 22expect ( [=[ 23 24[['W', 1], ['E^@CCCC', 1]] 25[['W', 1], ['E^@CCCC', 1]] 26[['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]]]=] ) 27end ) 28end )