Add ui test for default title (with/without filename) #3091

This commit is contained in:
Björn Linse 2015-07-23 21:07:51 +02:00
parent a39ce92f0b
commit 7a6bf3f418

View File

@ -63,6 +63,29 @@ describe('Screen', function()
end
end)
end)
it('has correct default title with unnamed file', function()
local expected = '[No Name] - NVIM'
execute('set title')
screen:wait(function()
local actual = screen.title
if actual ~= expected then
return 'Expected title to be "'..expected..'" but was "'..actual..'"'
end
end)
end)
it('has correct default title with named file', function()
local expected = 'myfile (/mydir) - NVIM'
execute('set title')
execute('file /mydir/myfile')
screen:wait(function()
local actual = screen.title
if actual ~= expected then
return 'Expected title to be "'..expected..'" but was "'..actual..'"'
end
end)
end)
end)
describe(':set icon', function()