Mercurial > vim
comparison src/testdir/test_regexp_latin.vim @ 28911:e25196adb7c1 v8.2.4978
patch 8.2.4978: no error if engine selection atom is not at the start
Commit: https://github.com/vim/vim/commit/360da40b47a84ee8586c3b5d062f8c64a2ac9cc6
Author: Christian Brabandt <cb@256bit.org>
Date: Wed May 18 15:04:02 2022 +0100
patch 8.2.4978: no error if engine selection atom is not at the start
Problem: No error if engine selection atom is not at the start.
Solution: Give an error. (Christian Brabandt, closes https://github.com/vim/vim/issues/10439)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 18 May 2022 16:15:03 +0200 |
parents | 786707ef91de |
children | be069ab9d583 |
comparison
equal
deleted
inserted
replaced
28910:983006b5755d | 28911:e25196adb7c1 |
---|---|
1094 exe "norm 0o000\<Esc>0\<C-V>$s0" | 1094 exe "norm 0o000\<Esc>0\<C-V>$s0" |
1095 /\%V | 1095 /\%V |
1096 bwipe! | 1096 bwipe! |
1097 endfunc | 1097 endfunc |
1098 | 1098 |
1099 func Test_using_two_engines_pattern() | |
1100 new | |
1101 call setline(1, ['foobar=0', 'foobar=1', 'foobar=2']) | |
1102 " \%#= at the end of the pattern | |
1103 for i in range(0, 2) | |
1104 call cursor( (i+1), 7) | |
1105 call assert_fails("%s/foobar\\%#=" .. i, 'E1281:') | |
1106 endfor | |
1107 | |
1108 " \%#= at the start of the pattern | |
1109 for i in range(0, 2) | |
1110 call cursor( (i+1), 7) | |
1111 exe ":%s/\\%#=" .. i .. "foobar=" .. i .. "/xx" | |
1112 endfor | |
1113 call assert_equal(['xx', 'xx', 'xx'], getline(1, '$')) | |
1114 bwipe! | |
1115 endfunc | |
1116 | |
1099 " vim: shiftwidth=2 sts=2 expandtab | 1117 " vim: shiftwidth=2 sts=2 expandtab |