comparison src/testdir/test_signs.vim @ 26434:f612c41cfd94 v8.2.3748

patch 8.2.3748: giving an error for an empty sign argument breaks a plugin Commit: https://github.com/vim/vim/commit/e5710a02cb78c2a0a868ea55740835c78ddecbb4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 5 19:10:04 2021 +0000 patch 8.2.3748: giving an error for an empty sign argument breaks a plugin Problem: Giving an error for an empty sign argument breaks a plugin. Solution: Do not give an error.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Dec 2021 20:15:03 +0100
parents 99a512bd8423
children 84d60deb8f82
comparison
equal deleted inserted replaced
26433:6d49ab05b0e9 26434:f612c41cfd94
123 123
124 " Only 1 or 2 character text is allowed 124 " Only 1 or 2 character text is allowed
125 call assert_fails("sign define Sign4 text=abc linehl=Comment", 'E239:') 125 call assert_fails("sign define Sign4 text=abc linehl=Comment", 'E239:')
126 call assert_fails("sign define Sign4 text= linehl=Comment", 'E239:') 126 call assert_fails("sign define Sign4 text= linehl=Comment", 'E239:')
127 call assert_fails("sign define Sign4 text=\\ ab linehl=Comment", 'E239:') 127 call assert_fails("sign define Sign4 text=\\ ab linehl=Comment", 'E239:')
128
129 " an empty highlight argument for a new sign is an error
130 call assert_fails("sign define SignX linehl=", 'E1249: Group name missing for linehl')
131 call assert_fails("sign define SignX culhl=", 'E1249: Group name missing for culhl')
132 call assert_fails("sign define SignX texthl=", 'E1249: Group name missing for texthl')
133 128
134 " an empty highlight argument for an existing sign clears it 129 " an empty highlight argument for an existing sign clears it
135 sign define SignY texthl=TextHl culhl=CulHl linehl=LineHl 130 sign define SignY texthl=TextHl culhl=CulHl linehl=LineHl
136 let sl = sign_getdefined('SignY')[0] 131 let sl = sign_getdefined('SignY')[0]
137 call assert_equal('TextHl', sl.texthl) 132 call assert_equal('TextHl', sl.texthl)