From a7bb63c55dacfa822e1a24d041771d9e8d83a980 Mon Sep 17 00:00:00 2001 From: Jack Bracewell Date: Fri, 24 Mar 2017 16:36:46 +0000 Subject: Add ‘eob’ option to fillchars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This option allows configuring what character is shown on the empty lines at the end of a buffer, previously hardcoded to ‘~’ --- test/functional/options/fillchars_spec.lua | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 test/functional/options/fillchars_spec.lua (limited to 'test') diff --git a/test/functional/options/fillchars_spec.lua b/test/functional/options/fillchars_spec.lua new file mode 100644 index 0000000000..4ac3655f08 --- /dev/null +++ b/test/functional/options/fillchars_spec.lua @@ -0,0 +1,45 @@ +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear, execute = helpers.clear, helpers.execute + +describe("'fillchars'", function() + local screen + + before_each(function() + clear() + screen = Screen.new(25, 5) + screen:attach() + end) + + after_each(function() + screen:detach() + end) + + describe('"eob" flag', function() + it('renders empty lines at the end of the buffer with eob', function() + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + | + ]]) + execute('set fillchars+=eob:\\ ') + screen:expect([[ + ^ | + | + | + | + :set fillchars+=eob:\ | + ]]) + execute('set fillchars+=eob:ñ') + screen:expect([[ + ^ | + ñ | + ñ | + ñ | + :set fillchars+=eob:ñ | + ]]) + end) + end) +end) -- cgit