mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
legacy tests: migrate test_qf_title
This commit is contained in:
parent
b18cd63260
commit
05fcce3896
@ -1,18 +0,0 @@
|
|||||||
Tests for quickfix window's title vim: set ft=vim :
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
:if !has('quickfix') | e! test.ok | wq! test.out | endif
|
|
||||||
:set efm=%E%f:%l:%c:%m
|
|
||||||
:cgetexpr ['file:1:1:message']
|
|
||||||
:let qflist=getqflist()
|
|
||||||
:call setqflist(qflist, 'r')
|
|
||||||
:copen
|
|
||||||
:let g:quickfix_title=w:quickfix_title
|
|
||||||
:wincmd p
|
|
||||||
:$put =g:quickfix_title
|
|
||||||
:/^Results/,$w test.out
|
|
||||||
:qa!
|
|
||||||
ENDTEST
|
|
||||||
|
|
||||||
Results of test_qf_title:
|
|
@ -1,2 +0,0 @@
|
|||||||
Results of test_qf_title:
|
|
||||||
:setqflist()
|
|
30
test/functional/legacy/qf_title_spec.lua
Normal file
30
test/functional/legacy/qf_title_spec.lua
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
-- Tests for quickfix window's title
|
||||||
|
|
||||||
|
local helpers = require('test.functional.helpers')
|
||||||
|
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
||||||
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
|
|
||||||
|
describe('qf_title', function()
|
||||||
|
setup(clear)
|
||||||
|
|
||||||
|
it('is working', function()
|
||||||
|
insert([[
|
||||||
|
Results of test_qf_title:]])
|
||||||
|
|
||||||
|
source([[
|
||||||
|
set efm=%E%f:%l:%c:%m
|
||||||
|
cgetexpr ['file:1:1:message']
|
||||||
|
let qflist=getqflist()
|
||||||
|
call setqflist(qflist, 'r')
|
||||||
|
copen
|
||||||
|
let g:quickfix_title=w:quickfix_title
|
||||||
|
wincmd p
|
||||||
|
$put =g:quickfix_title
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Assert buffer contents.
|
||||||
|
expect([[
|
||||||
|
Results of test_qf_title:
|
||||||
|
:setqflist()]])
|
||||||
|
end)
|
||||||
|
end)
|
Loading…
Reference in New Issue
Block a user