Fixed #30 : Add variable support in BNF concept definition
Fixed #31 : Add regex support in BNF Concept Fixed #33 : Do not memorize object during restore
This commit is contained in:
@@ -1237,6 +1237,18 @@ as:
|
||||
assert len(l) > 0
|
||||
sheerka.save_execution_context = False
|
||||
|
||||
def test_i_can_define_a_regex_concept_and_parse_it(self):
|
||||
sheerka, context = self.init_test().unpack()
|
||||
|
||||
res = sheerka.evaluate_user_input("def concept binary from bnf r'[01]+'")
|
||||
assert len(res) == 1
|
||||
assert res[0].status
|
||||
|
||||
res = sheerka.evaluate_user_input("01001")
|
||||
assert len(res) == 1
|
||||
assert res[0].status
|
||||
assert sheerka.isinstance(res[0].body, "binary")
|
||||
|
||||
|
||||
class TestSheerkaNonRegFile(TestUsingFileBasedSheerka):
|
||||
def test_i_can_def_several_concepts(self):
|
||||
|
||||
Reference in New Issue
Block a user