Missing parenteses in assert detected

This commit is contained in:
Anthony Scemama 2015-03-16 14:55:35 +01:00
parent 78eb6dae1b
commit 711eb39eb9
1 changed files with 2 additions and 0 deletions

View File

@ -522,6 +522,8 @@ def irp_simple_statements(text):
def process_assert(line):
assert type(line) == Assert
if command_line.do_assert:
if '(' not in line.text or ')' not in line.text:
error.fail(line,"Syntax error in ASSERT statement (parentheses)")
condition = "(%s"%(line.text.split('(',1)[1])
if condition == "":
error.fail(line,"Error in Assert statement")