mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Hopefully fixed bug with empty word to define.
This commit is contained in:
parent
edab9e52b2
commit
2221acebde
@ -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))
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user