From 9cf3f7586e8d46f29865afdfef793f8b14c6eee1 Mon Sep 17 00:00:00 2001 From: Victor M. Alvarez <vmalvarez@virustotal.com> Date: Sun, 31 Jan 2016 23:09:40 +0100 Subject: [PATCH] Add test cases for https://github.com/plusvic/yara/issues/369 --- tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests.py b/tests.py index c56f563..d60f495 100644 --- a/tests.py +++ b/tests.py @@ -392,6 +392,18 @@ class TestYara(unittest.TestCase): 'rule test { condition: 1 | 3 ^ 3 == (1 | 3) ^ 3}' ]) + def testSyntax(self): + + self.assertSyntaxError([ + 'rule test { strings: $a = "a" $a = "a" condition: all of them }' + ]) + + def testAnonymousStrings(self): + + self.assertTrueRules([ + 'rule test { strings: $ = "a" $ = "b" condition: all of them }', + ], "ab") + def testStrings(self): self.assertTrueRules([ -- libgit2 0.26.0