Adding lookbehind assertion

This commit is contained in:
LiHS
2019-08-15 14:06:10 +08:00
parent ac8d90e65a
commit c092b5fa3a
3 changed files with 18 additions and 2 deletions
+14
View File
@@ -22,6 +22,12 @@ describe('parser/javascript/subexp.js', function() {
'(?!test)': {
regexp: jasmine.objectContaining({ textValue: 'test' })
},
'(?<=test)': {
regexp: jasmine.objectContaining({ textValue: 'test' })
},
'(?<!test)': {
regexp: jasmine.objectContaining({ textValue: 'test' })
},
'(?:test)': {
regexp: jasmine.objectContaining({ textValue: 'test' }),
proxy: jasmine.objectContaining({ textValue: 'test' })
@@ -110,6 +116,14 @@ describe('parser/javascript/subexp.js', function() {
label: 'negative lookahead',
groupCounter: 1
},
'(?<=test)': {
label: 'positive lookbehind',
groupCounter: 1
},
'(?<!test)': {
label: 'negative lookbehind',
groupCounter: 1
},
'(?:test)': {
label: '',
groupCounter: 1