diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-10 21:18:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 21:18:12 +0800 |
commit | 9b1112cf48238260b170b8763b18a02a58159c2a (patch) | |
tree | a4a1c50014b7e1f4d373aa5648054b4cfb879baa /test/functional/api/vim_spec.lua | |
parent | 870ca1de52b240926b88f01afa697cd9b119bdac (diff) | |
download | rneovim-9b1112cf48238260b170b8763b18a02a58159c2a.tar.gz rneovim-9b1112cf48238260b170b8763b18a02a58159c2a.tar.bz2 rneovim-9b1112cf48238260b170b8763b18a02a58159c2a.zip |
fix(statuscolumn): fix crashes and clang/PVS warnings (#21725)
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 98bfb83dbd..aa2f46bb59 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -3126,7 +3126,12 @@ describe('API', function() eq('E539: Illegal character <}>', pcall_err(meths.eval_statusline, '%{%}', {})) end) - it('supports %S item', function() + it('supports various items', function() + eq({ str = '0', width = 1 }, + meths.eval_statusline('%l', { maxwidth = 5 })) + command('set readonly') + eq({ str = '[RO]', width = 4 }, + meths.eval_statusline('%r', { maxwidth = 5 })) local screen = Screen.new(80, 24) screen:attach() command('set showcmd') |