mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.2182: Vim9: value of 'magic' is still relevant
Problem: Vim9: value of 'magic' is still relevant. Solution: Always behave like 'magic' is on in Vim9 script (closes #7509)
This commit is contained in:
@@ -722,4 +722,22 @@ def Test_command_not_recognized()
|
||||
CheckDefFailure(lines, 'E1146:', 1)
|
||||
enddef
|
||||
|
||||
def Test_magic_not_used()
|
||||
new
|
||||
for cmd in ['set magic', 'set nomagic']
|
||||
exe cmd
|
||||
setline(1, 'aaa')
|
||||
s/.../bbb/
|
||||
assert_equal('bbb', getline(1))
|
||||
endfor
|
||||
|
||||
set magic
|
||||
setline(1, 'aaa')
|
||||
assert_fails('s/.\M../bbb/', 'E486:')
|
||||
assert_fails('snomagic/.../bbb/', 'E486:')
|
||||
assert_equal('aaa', getline(1))
|
||||
|
||||
bwipe!
|
||||
enddef
|
||||
|
||||
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
|
||||
|
Reference in New Issue
Block a user