From 384a39479a0b70abf9cd6ced0b5f1d53cd817c11 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Fri, 9 Feb 2018 08:44:24 +0900 Subject: 'fillchars': fix defaults logic; handle ambiwidth=double #7986 Update tests. --- test/functional/ui/screen_basic_spec.lua | 144 +++++++++++++++---------------- 1 file changed, 72 insertions(+), 72 deletions(-) (limited to 'test/functional/ui/screen_basic_spec.lua') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index b31d9cb32f..bbdf576641 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -189,12 +189,12 @@ describe('Screen', function() command('vsp') command('vsp') screen:expect([[ - ^ {3:|} {3:|} | - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| + ^ {3:│} {3:│} | + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| {1:[No Name] }{3:[No Name] [No Name] }| | {0:~ }| @@ -206,12 +206,12 @@ describe('Screen', function() ]]) insert('hello') screen:expect([[ - hell^o {3:|}hello {3:|}hello | - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| + hell^o {3:│}hello {3:│}hello | + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| hello | {0:~ }| @@ -232,12 +232,12 @@ describe('Screen', function() command('vsp') insert('hello') screen:expect([[ - hell^o {3:|}hello {3:|}hello | - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| + hell^o {3:│}hello {3:│}hello | + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| hello | {0:~ }| @@ -269,12 +269,12 @@ describe('Screen', function() command('tabprevious') screen:expect([[ {2: }{6:4}{2:+ [No Name] }{4: + [No Name] }{3: }{4:X}| - hell^o {3:|}hello {3:|}hello | - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| - {0:~ }{3:|}{0:~ }{3:|}{0:~ }| + hell^o {3:│}hello {3:│}hello | + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| + {0:~ }{3:│}{0:~ }{3:│}{0:~ }| {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| hello | {0:~ }| @@ -398,12 +398,12 @@ describe('Screen', function() command('vsp') command('vsp') screen:expect([[ - and {3:|}and {3:|}and | - clearing {3:|}clearing {3:|}clearing | - in {3:|}in {3:|}in | - split {3:|}split {3:|}split | - windows {3:|}windows {3:|}windows | - ^ {3:|} {3:|} | + and {3:│}and {3:│}and | + clearing {3:│}clearing {3:│}clearing | + in {3:│}in {3:│}in | + split {3:│}split {3:│}split | + windows {3:│}windows {3:│}windows | + ^ {3:│} {3:│} | {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| clearing | in | @@ -418,12 +418,12 @@ describe('Screen', function() it('only affects the current scroll region', function() feed('6k') screen:expect([[ - ^scrolling {3:|}and {3:|}and | - and {3:|}clearing {3:|}clearing | - clearing {3:|}in {3:|}in | - in {3:|}split {3:|}split | - split {3:|}windows {3:|}windows | - windows {3:|} {3:|} | + ^scrolling {3:│}and {3:│}and | + and {3:│}clearing {3:│}clearing | + clearing {3:│}in {3:│}in | + in {3:│}split {3:│}split | + split {3:│}windows {3:│}windows | + windows {3:│} {3:│} | {1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }| clearing | in | @@ -435,12 +435,12 @@ describe('Screen', function() ]]) feed('l') screen:expect([[ - scrolling {3:|}and {3:|}and | - and {3:|}clearing {3:|}clearing | - clearing {3:|}in {3:|}in | - in {3:|}split {3:|}split | - split {3:|}windows {3:|}windows | - windows {3:|}^ {3:|} | + scrolling {3:│}and {3:│}and | + and {3:│}clearing {3:│}clearing | + clearing {3:│}in {3:│}in | + in {3:│}split {3:│}split | + split {3:│}windows {3:│}windows | + windows {3:│}^ {3:│} | {3:[No Name] [+] }{1:[No Name] [+] }{3: Date: Sat, 31 Mar 2018 11:12:27 +0200 Subject: msg: do not scroll entire screen (#8088) --- test/functional/ui/screen_basic_spec.lua | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'test/functional/ui/screen_basic_spec.lua') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index bbdf576641..563d04416a 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -355,7 +355,8 @@ describe('Screen', function() ]]) end) - it('execute command with multi-line output', function() + it('execute command with multi-line output without msgsep', function() + command("set display-=msgsep") feed(':ls') screen:expect([[ {0:~ }| @@ -375,6 +376,28 @@ describe('Screen', function() ]]) feed('') -- skip the "Press ENTER..." state or tests will hang end) + + it('execute command with multi-line output and with msgsep', function() + command("set display+=msgsep") + feed(':ls') + screen:expect([[ + | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {1: }| + :ls | + 1 %a "[No Name]" line 1 | + {7:Press ENTER or type command to continue}^ | + ]]) + feed('') -- skip the "Press ENTER..." state or tests will hang + end) end) describe('scrolling and clearing', function() @@ -573,6 +596,7 @@ describe('Screen', function() command('nnoremap :echo "TEST"') feed(':ls') screen:expect([[ + | {0:~ }| {0:~ }| {0:~ }| @@ -582,8 +606,7 @@ describe('Screen', function() {0:~ }| {0:~ }| {0:~ }| - {0:~ }| - {0:~ }| + {1: }| :ls | 1 %a "[No Name]" line 1 | {7:Press ENTER or type command to continue}^ | -- cgit From fa6415f13f526220237cff6c6f0055aaad2cdd9e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 8 Apr 2018 03:01:15 +0200 Subject: test/API: validate channel arg (#8245) --- test/functional/ui/screen_basic_spec.lua | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'test/functional/ui/screen_basic_spec.lua') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 563d04416a..8a1f9b0d19 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -4,7 +4,6 @@ local spawn, set_session, clear = helpers.spawn, helpers.set_session, helpers.cl local feed, command = helpers.feed, helpers.command local insert = helpers.insert local eq = helpers.eq -local eval = helpers.eval local iswin = helpers.iswin describe('screen', function() @@ -631,21 +630,3 @@ describe('Screen', function() end) end) end) - -describe('nvim_ui_attach()', function() - before_each(function() - clear() - end) - it('handles very large width/height #2180', function() - local screen = Screen.new(999, 999) - screen:attach() - eq(999, eval('&lines')) - eq(999, eval('&columns')) - end) - it('invalid option returns error', function() - local screen = Screen.new() - local status, rv = pcall(function() screen:attach({foo={'foo'}}) end) - eq(false, status) - eq('No such ui option', rv:match("No such .*")) - end) -end) -- cgit