diff --git a/others/dictclient.py b/others/dictclient.py index e7a6094e2..10d403fd5 100644 --- a/others/dictclient.py +++ b/others/dictclient.py @@ -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)) diff --git a/test/test_Dict.py b/test/test_Dict.py index 35f2f9796..959738632 100644 --- a/test/test_Dict.py +++ b/test/test_Dict.py @@ -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') diff --git a/test/test_Utilities.py b/test/test_Utilities.py index 7ea4c85d7..9bb9e3e7a 100644 --- a/test/test_Utilities.py +++ b/test/test_Utilities.py @@ -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: