From 6fe8c1d0513c0facefa9b80078792dba627ec7a7 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Tue, 19 Jul 2016 23:24:42 -0700 Subject: vim-patch:7.4.1305 #5094 Problem: "\%1l^#.*" does not match on a line starting with "#". Solution: Do not clear the start-of-line flag. (Christian Brabandt) https://github.com/vim/vim/commit/7c29f387819b5817b003d2ba73e2b5cf3cb3d0dd Helped-by: jamessan Helped-by: mhinz --- test/functional/legacy/036_regexp_character_classes_spec.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/functional/legacy/036_regexp_character_classes_spec.lua') diff --git a/test/functional/legacy/036_regexp_character_classes_spec.lua b/test/functional/legacy/036_regexp_character_classes_spec.lua index 3d5e69d1e5..9e67bb9429 100644 --- a/test/functional/legacy/036_regexp_character_classes_spec.lua +++ b/test/functional/legacy/036_regexp_character_classes_spec.lua @@ -268,4 +268,15 @@ describe('character classes in regexp', function() ABCDEFGHIXYZ ABCDEFGHIXYZ]]) end) + it([["\%1l^#.*" does not match on a line starting with "#". (vim-patch:7.4.1305)]], function() + source([[ + 1 s/\%#=0\%1l^\t...//g + 2 s/\%#=1\%2l^\t...//g + 3 s/\%#=2\%3l^\t...//g + 4 s/\%#=0\%4l^\t...//g + 5 s/\%#=1\%5l^\t...//g + 6 s/\%#=2\%6l^\t...//g]]) + diff(sixlines(string.sub(punct1, 1)..digits..punct2..upper..punct3.. + lower..punct4..ctrl2..iso_text)) + end) end) -- cgit