mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +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:
|
if code != 151:
|
||||||
break
|
break
|
||||||
|
|
||||||
resultword, resultdb = re.search('^"(.+)" (\S+)', text).groups()
|
resultword, resultdb = re.search('^"(.*)" (\S+)', text).groups()
|
||||||
defstr = self.get100block()
|
defstr = self.get100block()
|
||||||
retval.append(Definition(self, self.getdbobj(resultdb),
|
retval.append(Definition(self, self.getdbobj(resultdb),
|
||||||
resultword, defstr))
|
resultword, defstr))
|
||||||
|
@ -45,6 +45,7 @@ class DictTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
def testDict(self):
|
def testDict(self):
|
||||||
self.assertNotError('dict slash')
|
self.assertNotError('dict slash')
|
||||||
self.assertNotRegexp('dict web1913 slash', 'foldoc')
|
self.assertNotRegexp('dict web1913 slash', 'foldoc')
|
||||||
|
self.assertNotError('dict ""')
|
||||||
|
|
||||||
def testDictionaries(self):
|
def testDictionaries(self):
|
||||||
self.assertNotError('dictionaries')
|
self.assertNotError('dictionaries')
|
||||||
|
@ -69,6 +69,7 @@ class UtilitiesTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
self.assertResponse('re "m/My children/" [cpustats]', 'My children')
|
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/g user user', 'luser luser')
|
||||||
self.assertResponse('re s/user/luser/ user user', 'luser user')
|
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:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user