diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-07-14 13:11:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-14 13:11:56 +0200 |
commit | 1e47e3f599673f4eaec204ef6de8eb07edd182a7 (patch) | |
tree | d37c8f743924f53d5d88877d040c6c25d3183874 /test | |
parent | 6f944d36cf8a89f128b638a6ea6b412d62f309bf (diff) | |
parent | 4c6e62d056bf9c1616ee879e84e9467eef082684 (diff) | |
download | rneovim-1e47e3f599673f4eaec204ef6de8eb07edd182a7.tar.gz rneovim-1e47e3f599673f4eaec204ef6de8eb07edd182a7.tar.bz2 rneovim-1e47e3f599673f4eaec204ef6de8eb07edd182a7.zip |
Merge pull request #10497 from bfredl/synlist
messages: fix missing newlines in execute("syn list").
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 09e13b1464..2857c2fe1e 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -804,6 +804,7 @@ describe('ui/builtin messages', function() [3] = {bold = true, reverse = true}, [4] = {bold = true, foreground = Screen.colors.SeaGreen4}, [5] = {foreground = Screen.colors.Blue1}, + [6] = {bold = true, foreground = Screen.colors.Magenta}, }) end) @@ -856,6 +857,46 @@ describe('ui/builtin messages', function() eq('ErrorMsg xxx ctermfg=15 ctermbg=1 guifg=White guibg=Red', meths.command_output("hi ErrorMsg")) end) + + it(':syntax list langGroup output', function() + command("syntax on") + command("set syntax=vim") + screen:try_resize(110,7) + feed(':syntax list vimComment<cr>') + screen:expect([[ + {6:--- Syntax items ---} | + vimComment {5:xxx} {5:match} /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 {5:excludenl} {5:contains}=@vimCommentGroup,vimCommentString | + | + {5:match} /\<endif\s\+".*$/ms=s+5,lc=5 {5:contains}=@vimCommentGroup,vimCommentString | + {5:match} /\<else\s\+".*$/ms=s+4,lc=4 {5:contains}=@vimCommentGroup,vimCommentString | + {5:links to} Comment | + {4:Press ENTER or type command to continue}^ | + ]]) + + feed('<cr>') + screen:try_resize(55,7) + feed(':syntax list vimComment<cr>') + screen:expect([[ + | + {5:match} /\<endif\s\+".*$/ms=s+5,lc=5 | + {5:contains}=@vimCommentGroup,vimCommentString | + {5:match} /\<else\s\+".*$/ms=s+4,lc=4 {5:c}| + {5:ontains}=@vimCommentGroup,vimCommentString | + {5:links to} Comment | + {4:Press ENTER or type command to continue}^ | + ]]) + feed('<cr>') + + -- ignore final whitespace inside string + -- luacheck: push ignore + eq([[--- Syntax items --- +vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vimCommentGroup,vimCommentString + match /\<endif\s\+".*$/ms=s+5,lc=5 contains=@vimCommentGroup,vimCommentString + match /\<else\s\+".*$/ms=s+4,lc=4 contains=@vimCommentGroup,vimCommentString + links to Comment]], + meths.command_output('syntax list vimComment')) + -- luacheck: pop + end) end) describe('ui/ext_messages', function() |