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