mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-24 02:54:05 +01:00
SedRegex: make callback matching case sensitive
This fixes a TypeError issue mentioned in d296bbb949
.
This commit is contained in:
parent
13c03716c5
commit
c399272173
@ -66,6 +66,7 @@ class SedRegex(callbacks.PluginRegexp):
|
|||||||
threaded = True
|
threaded = True
|
||||||
public = True
|
public = True
|
||||||
unaddressedRegexps = ['replacer']
|
unaddressedRegexps = ['replacer']
|
||||||
|
flags = 0 # Make callback matching case sensitive
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _unpack_sed(expr):
|
def _unpack_sed(expr):
|
||||||
|
@ -57,6 +57,10 @@ class SedRegexTestCase(ChannelPluginTestCase):
|
|||||||
m = self.getMsg(' ')
|
m = self.getMsg(' ')
|
||||||
self.assertIn('eliens', str(m))
|
self.assertIn('eliens', str(m))
|
||||||
|
|
||||||
|
def testIgnoreRegexpWithBadCase(self):
|
||||||
|
self.feedMsg('aliens are invading, help!')
|
||||||
|
self.assertNoResponse('S/aliens/monsters/')
|
||||||
|
|
||||||
def testGlobalReplace(self):
|
def testGlobalReplace(self):
|
||||||
self.feedMsg('AAaa aaAa a b')
|
self.feedMsg('AAaa aaAa a b')
|
||||||
self.feedMsg('s/a/e/g')
|
self.feedMsg('s/a/e/g')
|
||||||
|
Loading…
Reference in New Issue
Block a user