diff options
author | Jack Bracewell <jbtwentythree@gmail.com> | 2017-03-24 16:36:46 +0000 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2018-06-13 17:54:16 +0200 |
commit | a7bb63c55dacfa822e1a24d041771d9e8d83a980 (patch) | |
tree | 78ab8f42c2470f7a810b9327e18596a9973f030a /test | |
parent | 463da8480685dbd53335b4e3f0a6d37cacbacac4 (diff) | |
download | rneovim-a7bb63c55dacfa822e1a24d041771d9e8d83a980.tar.gz rneovim-a7bb63c55dacfa822e1a24d041771d9e8d83a980.tar.bz2 rneovim-a7bb63c55dacfa822e1a24d041771d9e8d83a980.zip |
Add ‘eob’ option to fillchars
This option allows configuring what character is shown on the empty
lines at the end of a buffer, previously hardcoded to ‘~’
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/options/fillchars_spec.lua | 45 |
1 files changed, 45 insertions, 0 deletions
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) |