From c2b3cc970c8d38a0623a69158b60d294d2513753 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 13 Jul 2019 20:08:28 +0200 Subject: syntax: fix missing newlines in execute("syn list"). fixes #10467 --- test/functional/ui/messages_spec.lua | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'test/functional/ui/messages_spec.lua') 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') + screen:expect([[ + {6:--- Syntax items ---} | + vimComment {5:xxx} {5:match} /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 {5:excludenl} {5:contains}=@vimCommentGroup,vimCommentString | + | + {5:match} /\') + screen:try_resize(55,7) + feed(':syntax list vimComment') + screen:expect([[ + | + {5:match} /\') + + -- 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 /\