summaryrefslogtreecommitdiff
path: root/tests/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-08-06 22:54:33 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-08-06 22:54:33 (GMT)
commit453825b9435ec5740fcada42cebe246325a07c37 (patch)
treeb59dacf1a6815c87e3c16a419301e6aae3cdb8a5 /tests/analysis
parent8bbd5527b66e1edd0a4a8a955dba095042b22f59 (diff)
Clean the code for ROST namespaces.
Diffstat (limited to 'tests/analysis')
-rw-r--r--tests/analysis/scan/fuzzing.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/analysis/scan/fuzzing.py b/tests/analysis/scan/fuzzing.py
index 2140972..6eecac9 100644
--- a/tests/analysis/scan/fuzzing.py
+++ b/tests/analysis/scan/fuzzing.py
@@ -1,5 +1,5 @@
-from chrysacase import ChrysalideTestCase
+from common import RostTestClass
from pychrysalide.analysis.contents import MemoryContent
from pychrysalide.analysis.scan import ContentScanner
from pychrysalide.analysis.scan import ScanOptions
@@ -7,7 +7,7 @@ from pychrysalide.analysis.scan.patterns.backends import AcismBackend
from pychrysalide.analysis.scan.patterns.backends import BitapBackend
-class TestRostFuzzingFixes(ChrysalideTestCase):
+class TestRostFuzzingFixes(RostTestClass):
"""TestCases to remember all the fixes for crashes identified by fuzzing."""
def testEmptyPatternListWithContent(self):
@@ -63,3 +63,18 @@ rule test {
with self.assertRaisesRegex(ValueError, 'Unable to create content scanner'):
scanner = ContentScanner(rule)
+
+
+ def testNamespacesWithoutReductionCode(self):
+ """Clean the code for ROST namespaces."""
+
+ rule = '''
+rule test {
+
+ condition:
+ console
+
+}
+'''
+
+ self.check_rule_failure(rule)