summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-08-06 22:22:12 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-08-06 22:22:12 (GMT)
commita02116de1290b1f5c7deda43071df762cebc9b84 (patch)
treec58be0b9376d340088cf6c786c8daa358fa14b55 /tests
parentdbe05c349a0892306d7317d3c26a56e9b19eca92 (diff)
Make the "condition" section mandatory in a rule.
Diffstat (limited to 'tests')
-rw-r--r--tests/analysis/scan/fuzzing.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/analysis/scan/fuzzing.py b/tests/analysis/scan/fuzzing.py
index 64eeb33..0870ed4 100644
--- a/tests/analysis/scan/fuzzing.py
+++ b/tests/analysis/scan/fuzzing.py
@@ -32,3 +32,17 @@ class TestRostFuzzingFixes(ChrysalideTestCase):
ctx = scanner.analyze(options, content)
self.assertIsNotNone(ctx)
+
+
+ def testMandatoryCondition(self):
+ """Ensure a condition section exists in a rule."""
+
+ rule = '''
+rule test {
+
+}
+'''
+
+ with self.assertRaisesRegex(ValueError, 'Unable to create content scanner'):
+
+ scanner = ContentScanner(rule)