From 4b1f21de75f9981007d80aca8355239e8615d6bd Mon Sep 17 00:00:00 2001 From: erw7 Date: Tue, 28 Mar 2017 18:07:58 +0900 Subject: win: support :terminal --- test/functional/terminal/window_spec.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'test/functional/terminal/window_spec.lua') diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index 888b1e1328..0f705cfe40 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -3,8 +3,6 @@ local thelpers = require('test.functional.terminal.helpers') local feed, clear = helpers.feed, helpers.clear local wait = helpers.wait -if helpers.pending_win32(pending) then return end - describe('terminal window', function() local screen -- cgit From b8a67551d8360ba095d1ffdbc9f8c40b612e9320 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Wed, 25 Oct 2017 11:18:47 -0400 Subject: terminal: Account for number column (#5310) --- test/functional/terminal/window_spec.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/functional/terminal/window_spec.lua') diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index 0f705cfe40..df8324fd6d 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -11,6 +11,34 @@ describe('terminal window', function() screen = thelpers.screen_setup() end) + describe('with number set', function() + before_each(function() + feed(':set numberi') + screen:expect([[ + {7: 1 }tty ready | + {7: 2 }rows: 6, cols: 46 | + {7: 3 }{1: } | + {7: 4 } | + {7: 5 } | + {7: 6 } | + {3:-- TERMINAL --} | + ]]) + end) + + it('wraps text correctly', function() + thelpers.feed_data({'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'}) + screen:expect([[ + {7: 1 }tty ready | + {7: 2 }rows: 6, cols: 46 | + {7: 3 }abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST| + {7: 4 }UVWXYZ{1: } | + {7: 5 } | + {7: 6 } | + {3:-- TERMINAL --} | + ]]) + end) + end) + describe('with colorcolumn set', function() before_each(function() feed('') -- cgit From bcf266de46b054b564727d5d31e4421ba09f5704 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 28 Oct 2017 17:54:29 +0200 Subject: test: :terminal + numberwidth=9 --- test/functional/terminal/window_spec.lua | 58 +++++++++++++++++++------------- 1 file changed, 35 insertions(+), 23 deletions(-) (limited to 'test/functional/terminal/window_spec.lua') diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index df8324fd6d..10a9fabb42 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -11,37 +11,49 @@ describe('terminal window', function() screen = thelpers.screen_setup() end) - describe('with number set', function() - before_each(function() - feed(':set numberi') + describe("with 'number'", function() + it('wraps text', function() + feed([[]]) + feed([[:set numberwidth=1 numberi]]) screen:expect([[ - {7: 1 }tty ready | - {7: 2 }rows: 6, cols: 46 | - {7: 3 }{1: } | - {7: 4 } | - {7: 5 } | - {7: 6 } | + {7:1 }tty ready | + {7:2 }rows: 6, cols: 48 | + {7:3 }{1: } | + {7:4 } | + {7:5 } | + {7:6 } | {3:-- TERMINAL --} | ]]) - end) - - it('wraps text correctly', function() thelpers.feed_data({'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'}) screen:expect([[ - {7: 1 }tty ready | - {7: 2 }rows: 6, cols: 46 | - {7: 3 }abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST| - {7: 4 }UVWXYZ{1: } | - {7: 5 } | - {7: 6 } | + {7:1 }tty ready | + {7:2 }rows: 6, cols: 48 | + {7:3 }abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV| + {7:4 }WXYZ{1: } | + {7:5 } | + {7:6 } | + {3:-- TERMINAL --} | + ]]) + + -- numberwidth=9 + feed([[]]) + feed([[:set numberwidth=9 numberi]]) + thelpers.feed_data({' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'}) + screen:expect([[ + {7: 1 }tty ready | + {7: 2 }rows: 6, cols: 48 | + {7: 3 }abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO| + {7: 4 }WXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJ| + {7: 5 }KLMNOPQRSTUVWXYZrows: 6, cols: 41 | + {7: 6 }{1: } | {3:-- TERMINAL --} | ]]) end) end) - describe('with colorcolumn set', function() + describe("with 'colorcolumn'", function() before_each(function() - feed('') + feed([[]]) screen:expect([[ tty ready | {2:^ } | @@ -51,7 +63,7 @@ describe('terminal window', function() | | ]]) - feed(':set colorcolumn=20i') + feed(':set colorcolumn=20i') end) it('wont show the color column', function() @@ -69,7 +81,7 @@ describe('terminal window', function() describe('with fold set', function() before_each(function() - feed(':set foldenable foldmethod=manuali') + feed([[:set foldenable foldmethod=manuali]]) thelpers.feed_data({'line1', 'line2', 'line3', 'line4', ''}) screen:expect([[ tty ready | @@ -83,7 +95,7 @@ describe('terminal window', function() end) it('wont show any folds', function() - feed('ggvGzf') + feed([[ggvGzf]]) wait() screen:expect([[ ^tty ready | -- cgit From 3a938fff0954513f34704485e53dcb9a0cc7c59d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 29 Oct 2017 02:10:37 +0100 Subject: test/win: partially disable :terminal resize test (#7453) --- test/functional/terminal/window_spec.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/functional/terminal/window_spec.lua') diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index 10a9fabb42..231618c5da 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local thelpers = require('test.functional.terminal.helpers') local feed, clear = helpers.feed, helpers.clear local wait = helpers.wait +local iswin = helpers.iswin describe('terminal window', function() local screen @@ -35,6 +36,10 @@ describe('terminal window', function() {3:-- TERMINAL --} | ]]) + if iswin() then + return -- win: :terminal resize is unreliable #7007 + end + -- numberwidth=9 feed([[]]) feed([[:set numberwidth=9 numberi]]) -- cgit From b63cde97f40b962f80ab929036d0eb8c1228b33f Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 12 Nov 2017 14:22:35 -0500 Subject: tests: terminal: Assert for SIGWINCH handling before continuing Fixes test failures like test/functional/terminal/cursor_spec.lua @ 62: terminal cursor with number column is positioned correctly when focused ./test/functional/ui/screen.lua:302: Row 2 did not match. Expected: |{7: 1 }tty ready | |*{7: 2 }{1: } | |{7: 3 } | |{7: 4 } | |{7: 5 } | |{7: 6 } | |{3:-- TERMINAL --} | Actual: |{7: 1 }tty ready | |*{7: 2 }rows: 6, cols: 46 | |{7: 3 }{1: } | |{7: 4 } | |{7: 5 } | |{7: 6 } | |{3:-- TERMINAL --} | --- test/functional/terminal/window_spec.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'test/functional/terminal/window_spec.lua') diff --git a/test/functional/terminal/window_spec.lua b/test/functional/terminal/window_spec.lua index 231618c5da..842a81872e 100644 --- a/test/functional/terminal/window_spec.lua +++ b/test/functional/terminal/window_spec.lua @@ -43,14 +43,23 @@ describe('terminal window', function() -- numberwidth=9 feed([[]]) feed([[:set numberwidth=9 numberi]]) + screen:expect([[ + {7: 1 }tty ready | + {7: 2 }rows: 6, cols: 48 | + {7: 3 }abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO| + {7: 4 }WXYZrows: 6, cols: 41 | + {7: 5 }{1: } | + {7: 6 } | + {3:-- TERMINAL --} | + ]]) thelpers.feed_data({' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'}) screen:expect([[ {7: 1 }tty ready | {7: 2 }rows: 6, cols: 48 | {7: 3 }abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO| - {7: 4 }WXYZ abcdefghijklmnopqrstuvwxyzABCDEFGHIJ| - {7: 5 }KLMNOPQRSTUVWXYZrows: 6, cols: 41 | - {7: 6 }{1: } | + {7: 4 }WXYZrows: 6, cols: 41 | + {7: 5 } abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN| + {7: 6 }OPQRSTUVWXYZ{1: } | {3:-- TERMINAL --} | ]]) end) -- cgit