diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-28 17:54:29 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-10-28 17:55:11 +0200 |
commit | bcf266de46b054b564727d5d31e4421ba09f5704 (patch) | |
tree | c3d99f6a5f21129d4c27514ae81cecfc08586e45 /test/functional/terminal/window_spec.lua | |
parent | b8a67551d8360ba095d1ffdbc9f8c40b612e9320 (diff) | |
download | rneovim-bcf266de46b054b564727d5d31e4421ba09f5704.tar.gz rneovim-bcf266de46b054b564727d5d31e4421ba09f5704.tar.bz2 rneovim-bcf266de46b054b564727d5d31e4421ba09f5704.zip |
test: :terminal + numberwidth=9
Diffstat (limited to 'test/functional/terminal/window_spec.lua')
-rw-r--r-- | test/functional/terminal/window_spec.lua | 58 |
1 files changed, 35 insertions, 23 deletions
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('<c-\\><c-n>:set number<cr>i') + describe("with 'number'", function() + it('wraps text', function() + feed([[<C-\><C-N>]]) + feed([[:set numberwidth=1 number<CR>i]]) 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([[<C-\><C-N>]]) + feed([[:set numberwidth=9 number<CR>i]]) + 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('<c-\\><c-n>') + feed([[<C-\><C-N>]]) screen:expect([[ tty ready | {2:^ } | @@ -51,7 +63,7 @@ describe('terminal window', function() | | ]]) - feed(':set colorcolumn=20<cr>i') + feed(':set colorcolumn=20<CR>i') 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('<c-\\><c-n>:set foldenable foldmethod=manual<cr>i') + feed([[<C-\><C-N>:set foldenable foldmethod=manual<CR>i]]) 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('<c-\\><c-n>ggvGzf') + feed([[<C-\><C-N>ggvGzf]]) wait() screen:expect([[ ^tty ready | |