[Forensics-changes] [yara] 295/415: Add test cases for case-insensitive regexp matching on external variables
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:43:16 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository yara.
commit d5ac6248e95938a60c05272ac6d19eb3d3374011
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date: Fri Dec 6 18:00:22 2013 +0100
Add test cases for case-insensitive regexp matching on external variables
---
yara-python/tests.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/yara-python/tests.py b/yara-python/tests.py
index 725b97c..3f29742 100644
--- a/yara-python/tests.py
+++ b/yara-python/tests.py
@@ -528,6 +528,12 @@ class TestYara(unittest.TestCase):
r = yara.compile(source='rule test { condition: ext_str matches /foo/ }', externals={'ext_str': ''})
self.assertFalse(r.match(data='dummy'))
+ r = yara.compile(source='rule test { condition: ext_str matches /foo/ }', externals={'ext_str': 'FOO'})
+ self.assertFalse(r.match(data='dummy'))
+
+ r = yara.compile(source='rule test { condition: ext_str matches /foo/i }', externals={'ext_str': 'FOO'})
+ self.assertTrue(r.match(data='dummy'))
+
r = yara.compile(source='rule test { condition: ext_str matches /ssi(s|p)/ }', externals={'ext_str': 'mississippi'})
self.assertTrue(r.match(data='dummy'))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list