aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/036_regexp_character_classes_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-05-13 07:51:01 -0400
committerGitHub <noreply@github.com>2017-05-13 07:51:01 -0400
commitac47f8a50691e6ce99c54712e5c984db8b1f079e (patch)
treef6863f960fe46983b5efb2a84db0bed6f8c80b75 /test/functional/legacy/036_regexp_character_classes_spec.lua
parentae3d5e5ecc32f4ca6a29976880f225a716bad44b (diff)
parentf3a508b4a3c13cc755b355976c6e0f2fae7e1645 (diff)
downloadrneovim-ac47f8a50691e6ce99c54712e5c984db8b1f079e.tar.gz
rneovim-ac47f8a50691e6ce99c54712e5c984db8b1f079e.tar.bz2
rneovim-ac47f8a50691e6ce99c54712e5c984db8b1f079e.zip
Merge pull request #6514 from jamessan/gcc-7-fixes
Fix GCC 7 issues
Diffstat (limited to 'test/functional/legacy/036_regexp_character_classes_spec.lua')
-rw-r--r--test/functional/legacy/036_regexp_character_classes_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/legacy/036_regexp_character_classes_spec.lua b/test/functional/legacy/036_regexp_character_classes_spec.lua
index 110f7dd852..38e8145d1c 100644
--- a/test/functional/legacy/036_regexp_character_classes_spec.lua
+++ b/test/functional/legacy/036_regexp_character_classes_spec.lua
@@ -275,4 +275,16 @@ describe('character classes in regexp', function()
diff(sixlines(string.sub(punct1, 1)..digits..punct2..upper..punct3..
lower..punct4..ctrl2..iso_text))
end)
+ it('does not convert character class ranges to an incorrect class', function()
+ source([[
+ 1 s/\%#=0[0-z]//g
+ 2 s/\%#=1[0-z]//g
+ 3 s/\%#=2[0-z]//g
+ 4 s/\%#=0[^0-z]//g
+ 5 s/\%#=1[^0-z]//g
+ 6 s/\%#=2[^0-z]//g
+ ]])
+ diff(string.rep(ctrl1..punct1..punct4..ctrl2..iso_text..'\n', 3)
+ ..string.rep(digits..punct2..upper..punct3..lower..'\n', 3))
+ end)
end)