@@ -16,25 +16,21 @@ set noswapfile
1616set viminfo =
1717
1818
19- fun ! GetFileLine (filename,line )
20- return readfile (a: filename ,' ' ,a: line )[a: line- 1 ]
21- endfun
22-
23-
2419fun ! GetFileForLang (lang_name,line )
2520 let l: path = fnamemodify (resolve (expand (' %:p' )), ' :h' )
2621 let l: filename = l: path . ' /test/ft/' . ' a.' . a: lang_name
2722 return readfile (l: filename ,' ' ,a: line )[a: line- 1 ]
2823endfun
2924
3025" "
31- " Format the given str based on the expected line and the expected counter
32- " given . Function searches for the $N$ identifiers in the string and replaces
26+ " Format the given str based on the expected line and the expected given
27+ " counter . Function searches for the $N$ identifiers in the string and replaces
3328" them with the line and counter respectively.
3429"
3530" Returns the modified string.
3631"
3732fun ! FormatStrForExpectedLine (str, line , cnt)
3833 let l: strTmp = substitute (a: str , ' \$1\$' , a: line , " " )
39- return substitute (l: strTmp , ' \$2\$' , a: cnt , " " )
34+ let l: res = substitute (l: strTmp , ' \$2\$' , a: cnt , " " )
35+ return l: res
4036endfun
0 commit comments