minor fix
This commit is contained in:
parent
fd088d4e3c
commit
388a68e1fc
@ -52,7 +52,7 @@ class RegexInterpreter(AbstractInterpreter):
|
|||||||
|
|
||||||
def isValid(self,f)->bool:
|
def isValid(self,f)->bool:
|
||||||
|
|
||||||
formula = f.s.replace("!", "\\!")
|
formula = "({0})".format(f.s.replace("!", "\\!"))
|
||||||
|
|
||||||
make_reg = lambda formula,pattern: 'echo "{0}" | grep -P "{1}"'.format(formula,pattern)
|
make_reg = lambda formula,pattern: 'echo "{0}" | grep -P "{1}"'.format(formula,pattern)
|
||||||
def check_assertion(formula, pattern):
|
def check_assertion(formula, pattern):
|
||||||
@ -192,7 +192,7 @@ if len(sys.argv) > 1 :
|
|||||||
for l in u:
|
for l in u:
|
||||||
print(Formula(l,i).isValid())
|
print(Formula(l,i).isValid())
|
||||||
else:
|
else:
|
||||||
print(Formula( sys.argv[1],i).isValid())
|
print(Formula( sys.argv[1] if sys.argv[1] != '-g' else sys.argv[2],i).isValid())
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("help?")
|
print("help?")
|
||||||
|
Loading…
Reference in New Issue
Block a user