Hopefully fixed bug with empty word to define.

This commit is contained in:
Jeremy Fincher 2003-10-17 21:15:48 +00:00
parent edab9e52b2
commit 2221acebde
3 changed files with 3 additions and 1 deletions

View File

@ -197,7 +197,7 @@ class Connection:
if code != 151:
break
resultword, resultdb = re.search('^"(.+)" (\S+)', text).groups()
resultword, resultdb = re.search('^"(.*)" (\S+)', text).groups()
defstr = self.get100block()
retval.append(Definition(self, self.getdbobj(resultdb),
resultword, defstr))

View File

@ -45,6 +45,7 @@ class DictTestCase(PluginTestCase, PluginDocumentation):
def testDict(self):
self.assertNotError('dict slash')
self.assertNotRegexp('dict web1913 slash', 'foldoc')
self.assertNotError('dict ""')
def testDictionaries(self):
self.assertNotError('dictionaries')

View File

@ -69,6 +69,7 @@ class UtilitiesTestCase(PluginTestCase, PluginDocumentation):
self.assertResponse('re "m/My children/" [cpustats]', 'My children')
self.assertResponse('re s/user/luser/g user user', 'luser luser')
self.assertResponse('re s/user/luser/ user user', 'luser user')
self.assertNotRegexp('re m/foo/ bar', 'has no attribute')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: