aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/helpers.lua2
-rw-r--r--test/functional/ui/screen_basic_spec.lua45
2 files changed, 44 insertions, 3 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 1159707282..799b57494b 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -7,7 +7,7 @@ local Session = require('nvim.session')
local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim'
local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
- '--cmd', 'set shortmess+=I background=light noswapfile noautoindent',
+ '--cmd', 'set shortmess+=I background=light noswapfile noautoindent laststatus=1',
'--embed'}
-- Formulate a path to the directory containing nvim. We use this to
diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua
index 421c167300..7ba82c8b7b 100644
--- a/test/functional/ui/screen_basic_spec.lua
+++ b/test/functional/ui/screen_basic_spec.lua
@@ -1,8 +1,50 @@
local helpers = require('test.functional.helpers')
local Screen = require('test.functional.ui.screen')
-local clear, feed, execute = helpers.clear, helpers.feed, helpers.execute
+local spawn, set_session, clear = helpers.spawn, helpers.set_session, helpers.clear
+local feed, execute = helpers.feed, helpers.execute
local insert, wait = helpers.insert, helpers.wait
+describe('Initial screen', function()
+ local screen
+ local nvim_argv = {helpers.nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
+ '--cmd', 'set shortmess+=I background=light noswapfile',
+ '--embed'}
+
+ before_each(function()
+ if session then
+ session:exit(0)
+ end
+ local screen_nvim = spawn(nvim_argv)
+ set_session(screen_nvim)
+ screen = Screen.new()
+ screen:attach()
+ screen:set_default_attr_ignore( {{bold=true, foreground=255}} )
+ end)
+
+ after_each(function()
+ screen:detach()
+ end)
+
+ it('is the default initial screen', function()
+ screen:expect([[
+ ^ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ [No Name] |
+ |
+ ]])
+ end)
+end)
+
describe('Screen', function()
local screen
@@ -102,7 +144,6 @@ describe('Screen', function()
end)
end)
-
describe('window', function()
describe('split', function()
it('horizontal', function()