fix some more edge cases

This commit is contained in:
Kyryl Melekhin
2021-09-22 10:31:28 +00:00
parent cc17c0bb05
commit e3bede1739
2 changed files with 26 additions and 11 deletions

18
test.sh
View File

@@ -115,6 +115,12 @@ qwerty.*$
a(?:b|c|d){4,5}(.)
(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))
\\\\<abc
a\\\\([COM]+\\\\)|([A-Za-z_%.]+):
xyz\\\\([COM]+\\\\)|(abcd[A-Za-z_%.]+):cd
aaaaa(aa)aa(aa(a)a)?aa
^\\\\.+(((/)\\\\.\\\\.+)+)?
^(http|https|ftp):[/]{2}([a-zA-Z0-9\\\\\\\\.]+\\\\.[a-zA-Z]{2,4})(:[0-9]+)?/?([a-zA-Z0-9\\\\\\\\._?,'/+&amp;%$#=~]*)
(\\\\$\\\\([a-zA-Z0-9_]+\\\\))|(([A-Za-z_%.]+):)
"
input="\
abcdef
@@ -231,6 +237,12 @@ abcd
acdbcdbe
cabbbb
dabc
a(COM:=.o):
xyz(abcdCOM:cd):
aaaaaaaaaaaaaaaaaaaaaaaaa
../../..
https://kyryl.tk/404
OBJ = \$(SRC:.c=.o)
"
expect="\
(0,3)
@@ -347,6 +359,12 @@ expect="\
(0,7)(6,7)
(0,6)
-nomatch-
(2,6)(2,5)
(4,14)(4,11)
(0,15)(5,7)(9,13)(11,12)
(0,8)(2,8)(5,8)(5,6)
(0,20)(0,5)(8,16)(?,?)(17,20)
(8,12)(?,?)(8,12)(8,11)
(0,0)
"