diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-16 23:42:25 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-16 23:42:25 -0300 |
commit | 0429857689ba98356bc80d01ebd540fe861e8db2 (patch) | |
tree | b4d039dba9e18a041b00cfe31d954931a97241dd /test/functional/legacy | |
parent | af46564dd6e7e709f269f041f749dc312d9c3773 (diff) | |
parent | 40b7990553997d9eabb21b746346356016b373c5 (diff) | |
download | rneovim-0429857689ba98356bc80d01ebd540fe861e8db2.tar.gz rneovim-0429857689ba98356bc80d01ebd540fe861e8db2.tar.bz2 rneovim-0429857689ba98356bc80d01ebd540fe861e8db2.zip |
Merge PR #1820 'Reimplement builtin terminal UI with termkey/unibilium'
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/051_highlight_spec.lua | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/test/functional/legacy/051_highlight_spec.lua b/test/functional/legacy/051_highlight_spec.lua index f35b70f93f..19eb4104cd 100644 --- a/test/functional/legacy/051_highlight_spec.lua +++ b/test/functional/legacy/051_highlight_spec.lua @@ -1,23 +1,44 @@ -- vim: set foldmethod=marker foldmarker=[[,]] : -- Tests for ":highlight". +local Screen = require('test.functional.ui.screen') local helpers = require('test.functional.helpers') local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local execute, expect = helpers.execute, helpers.expect +local wait = helpers.wait describe(':highlight', function() setup(clear) it('is working', function() + local screen = Screen.new(35, 10) + screen:attach() -- Basic test if ":highlight" doesn't crash execute('highlight') + -- FIXME(tarruda): We need to be sure the prompt is displayed before + -- continuing, or risk a race condition where some of the following input + -- is discarded resulting in test failure + screen:expect([[ + :highlight | + SpecialKey xxx ctermfg=4 | + guifg=Blue | + EndOfBuffer xxx links to NonText| + | + NonText xxx ctermfg=12 | + gui=bold | + guifg=Blue | + Directory xxx ctermfg=4 | + -- More --^ | + ]]) + feed('q') + wait() -- wait until we're back to normal execute('hi Search') -- Test setting colors. -- Test clearing one color and all doesn't generate error or warning - execute('hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibg=Cyan') - execute('hi Group2 term= cterm=') - execute('hi Group3 term=underline cterm=bold') + execute('hi NewGroup cterm=italic ctermfg=DarkBlue ctermbg=Grey gui=NONE guifg=#00ff00 guibg=Cyan') + execute('hi Group2 cterm=NONE') + execute('hi Group3 cterm=bold') execute('redir! @a') execute('hi NewGroup') execute('hi Group2') @@ -29,7 +50,7 @@ describe(':highlight', function() execute('hi Group2') execute('hi clear') execute('hi Group3') - execute([[hi Crash term='asdf]]) + execute([[hi Crash cterm='asdf]]) execute('redir END') -- Filter ctermfg and ctermbg, the numbers depend on the terminal @@ -48,11 +69,15 @@ describe(':highlight', function() expect([[ - NewGroup xxx term=bold cterm=italic ctermfg=2 ctermbg=3 + NewGroup xxx cterm=italic + ctermfg=2 + ctermbg=3 + guifg=#00ff00 + guibg=Cyan Group2 xxx cleared - Group3 xxx term=underline cterm=bold + Group3 xxx cterm=bold NewGroup xxx cleared @@ -65,6 +90,7 @@ describe(':highlight', function() Group3 xxx cleared - E475: term='asdf]]) + E475: cterm='asdf]]) + screen:detach() end) end) |