Skip to content

Commit

Permalink
Update to a more logical regular expression test string
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and nyalldawson committed Apr 1, 2021
1 parent be1ba89 commit b065d5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsdelimitedtextprovider.py
Expand Up @@ -574,7 +574,7 @@ def test_017_regular_expression_1(self):
def test_018_regular_expression_2(self):
# Parsing regular expression delimiter with capture groups
filename = 'testre.txt'
params = {'geomType': 'none', 'trimFields': 'Y', 'delimiter': '(RE)(GEXP)?', 'type': 'regexp'}
params = {'geomType': 'none', 'trimFields': 'Y', 'delimiter': '(RE)((?:GEXP)?)', 'type': 'regexp'}
requests = None
self.runTest(filename, requests, **params)

Expand Down
12 changes: 6 additions & 6 deletions tests/src/python/test_qgsdelimitedtextprovider_wanted.py
Expand Up @@ -869,7 +869,7 @@ def test_017_regular_expression_1():

def test_018_regular_expression_2():
wanted = {}
wanted['uri'] = 'file://testre.txt?geomType=none&trimFields=Y&delimiter=(RE)(GEXP)?&type=regexp'
wanted['uri'] = 'file://testre.txt?geomType=none&trimFields=Y&delimiter=(RE)((?:GEXP)?)&type=regexp'
wanted['fieldTypes'] = ['integer', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text']
wanted['geometryType'] = 4
wanted['data'] = {
Expand All @@ -893,11 +893,11 @@ def test_018_regular_expression_2():
'GEXP': 'GEXP',
'description': 'RE',
'RE_1': 'RE',
'GEXP_1': 'data2',
'data': 'RE',
'RE_2': 'info2',
'GEXP_2': 'NULL',
'info': 'NULL',
'GEXP_1': '',
'data': 'data2',
'RE_2': 'RE',
'GEXP_2': '',
'info': 'info2',
'#fid': 3,
'#geometry': 'None',
},
Expand Down

0 comments on commit b065d5e

Please sign in to comment.