Commit b9eebf2a authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Fix split input bug

Refs: #4232
parent 82cc4b8f
......@@ -411,7 +411,10 @@ def split_input(line):
except IndexError:
break
if part:
terms += part
if tpart and not tpart[-1].endswith(' '):
terms[-1] += ' '.join(part)
else:
terms += part
return terms
......
......@@ -418,10 +418,10 @@ class UtilsMethods(TestCase):
('"parsable"', ['parsable']),
('"parse" out', ['parse', 'out']),
('"one', ['"one']),
('two" or" more"', ['two', ' or', 'more"']),
('two" or" more"', ['two or', 'more"']),
('Go "down \'deep " deeper \'bottom \' up" go\' up" !', [
'Go', "down 'deep ", 'deeper', 'bottom ',
'up', " go' up", '!']),
'up go\' up', '!']),
('Is "this" a \'parsed\' string?', [
'Is', 'this', 'a', 'parsed', 'string?'])):
self.assertEqual(split_input(line), expected)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment