Add test for a bug Tar-Get brought up on IRC

This commit is contained in:
James Vega 2008-12-10 05:54:16 +00:00
parent 507b95a2eb
commit 1f4d1fca9f

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2002-2004, Jeremiah Fincher
# Copyright (c) 2008, James Vega
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -55,6 +56,18 @@ class SchedulerTestCase(ChannelPluginTestCase):
self.assertNotError('scheduler remove %s' % id) self.assertNotError('scheduler remove %s' % id)
self.assertNoResponse(' ', 5) self.assertNoResponse(' ', 5)
# Need this test to run first so it has id 0 for its event
def test00RemoveZero(self):
id = None
m = self.assertNotError('scheduler add 5 echo testRemoveZero')
for s in m.args[1].split():
s = s.lstrip('#')
if s.isdigit():
id = s
break
self.assertNotError('scheduler remove %s' % id)
self.assertNoResponse(' ', 5)
def testRepeat(self): def testRepeat(self):
self.assertNotError('scheduler repeat repeater 5 echo testRepeat') self.assertNotError('scheduler repeat repeater 5 echo testRepeat')
self.assertResponse(' ', 'testRepeat') self.assertResponse(' ', 'testRepeat')