mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Now globs will actually be globbed
This commit is contained in:
parent
318b9d5d19
commit
627dd87baf
@ -285,6 +285,8 @@ class Todo(callbacks.Privmsg):
|
||||
predicateName += 'p'
|
||||
for glob in rest:
|
||||
criteria.append('task LIKE %s')
|
||||
if '?' not in glob and '*' not in glob:
|
||||
glob = '*%s*' % glob
|
||||
formats.append(glob.translate(self._sqlTrans))
|
||||
cursor = db.cursor()
|
||||
sql = """SELECT id, task FROM todo WHERE %s""" % ' AND '.join(criteria)
|
||||
|
@ -107,6 +107,7 @@ if sqlite is not None:
|
||||
def testSearchtodo(self):
|
||||
self.assertNotError('todo add task number one')
|
||||
self.assertRegexp('todo search task*', '#1: task number one')
|
||||
self.assertRegexp('todo search number', '#1: task number one')
|
||||
self.assertNotError('todo add task number two is much longer than'
|
||||
' task number one')
|
||||
self.assertRegexp('todo search task*',
|
||||
|
Loading…
Reference in New Issue
Block a user