mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +01:00
Changed to use more generic names.
This commit is contained in:
parent
5bae246ad5
commit
9ca4050b9b
@ -137,7 +137,7 @@ class Todo(callbacks.Privmsg):
|
|||||||
for item in cursor.fetchall()]
|
for item in cursor.fetchall()]
|
||||||
irc.reply(msg, utils.commaAndify(s))
|
irc.reply(msg, utils.commaAndify(s))
|
||||||
|
|
||||||
def addtodo(self, irc, msg, args):
|
def add(self, irc, msg, args):
|
||||||
"""[--priority=<num>] <text>
|
"""[--priority=<num>] <text>
|
||||||
|
|
||||||
Adds <text> as a task in your own personal todo list. The optional
|
Adds <text> as a task in your own personal todo list. The optional
|
||||||
@ -165,7 +165,7 @@ class Todo(callbacks.Privmsg):
|
|||||||
self.db.commit()
|
self.db.commit()
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
|
|
||||||
def removetodo(self, irc, msg, args):
|
def remove(self, irc, msg, args):
|
||||||
"""<task id>
|
"""<task id>
|
||||||
|
|
||||||
Removes <task id> from your personal todo list.
|
Removes <task id> from your personal todo list.
|
||||||
@ -188,7 +188,7 @@ class Todo(callbacks.Privmsg):
|
|||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
|
|
||||||
_sqlTrans = string.maketrans('*?', '%_')
|
_sqlTrans = string.maketrans('*?', '%_')
|
||||||
def searchtodo(self, irc, msg, args):
|
def search(self, irc, msg, args):
|
||||||
"""[--{regexp,exact}=<value>] [<glob>]
|
"""[--{regexp,exact}=<value>] [<glob>]
|
||||||
|
|
||||||
Searches the keyspace for tasks matching <glob>. If --regexp is given,
|
Searches the keyspace for tasks matching <glob>. If --regexp is given,
|
||||||
|
@ -50,31 +50,31 @@ if sqlite is not None:
|
|||||||
self.assertNotError('todo')
|
self.assertNotError('todo')
|
||||||
self.assertRegexp('todo', 'You have no tasks in your todo list.')
|
self.assertRegexp('todo', 'You have no tasks in your todo list.')
|
||||||
# Add a task
|
# Add a task
|
||||||
self.assertNotError('addtodo wash my car')
|
self.assertNotError('todo add wash my car')
|
||||||
self.assertRegexp('todo', '#1: wash my car')
|
self.assertRegexp('todo', '#1: wash my car')
|
||||||
# Check that task
|
# Check that task
|
||||||
self.assertNotError('todo 1')
|
self.assertNotError('todo 1')
|
||||||
|
|
||||||
def testAddtodo(self):
|
def testAddtodo(self):
|
||||||
self.assertNotError('addtodo code a new plugin')
|
self.assertNotError('todo add code a new plugin')
|
||||||
self.assertNotError('addtodo --priority=1000 fix all bugs')
|
self.assertNotError('todo add --priority=1000 fix all bugs')
|
||||||
|
|
||||||
def testRemovetodo(self):
|
def testRemovetodo(self):
|
||||||
self.assertNotError('addtodo do something else')
|
self.assertNotError('todo add do something else')
|
||||||
self.assertNotError('removetodo 1')
|
self.assertNotError('todo remove 1')
|
||||||
|
|
||||||
def testSearchtodo(self):
|
def testSearchtodo(self):
|
||||||
self.assertNotError('addtodo task number one')
|
self.assertNotError('todo add task number one')
|
||||||
self.assertRegexp('searchtodo task*', '#1: task number one')
|
self.assertRegexp('todo search task*', '#1: task number one')
|
||||||
self.assertNotError('addtodo task number two is much longer than'
|
self.assertNotError('todo add task number two is much longer than'
|
||||||
' task number one')
|
' task number one')
|
||||||
self.assertRegexp('searchtodo task*', '#1: task number one and #2:'
|
self.assertRegexp('todo search task*','#1: task number one and #2:'
|
||||||
' task number two is much longer than task '
|
' task number two is much longer than task '
|
||||||
'number...')
|
'number...')
|
||||||
self.assertRegexp('searchtodo --exact "task number one"',
|
self.assertRegexp('todo search --exact "task number one"',
|
||||||
'#1: task number one')
|
'#1: task number one')
|
||||||
self.assertError('searchtodo --regexp s/bustedregex')
|
self.assertError('todo search --regexp s/bustedregex')
|
||||||
self.assertRegexp('searchtodo --regexp m/task/', '#1: task number'
|
self.assertRegexp('todo search --regexp m/task/', '#1: task number'
|
||||||
' one and #2: task number two is much longer '
|
' one and #2: task number two is much longer '
|
||||||
'than task number...')
|
'than task number...')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user