X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=tests%2Ftestcase.g;h=35a36f171b029dc329e92a240243729beb32343a;hb=0b06adf9f460b7492bba71f18f7eb716e381af67;hp=2491600ea0eb3e8536accef2298615ea5dec7fc8;hpb=fa1789c285ada403436c9ef4e5a4302f34a6de86;p=sbp.git diff --git a/tests/testcase.g b/tests/testcase.g index 2491600..35a36f1 100644 --- a/tests/testcase.g +++ b/tests/testcase.g @@ -1,9 +1,12 @@ #import meta.g as grammar +s = ws! (TestCases:: TestCase */ ws) ws! +Input = "input" grammar.Quoted ";" /ws +Output = "output" grammar.Quoted ";" /ws +Outputs:: = Output */ ws +TestCase:: = "testcase" grammar.Quoted "{" + Input + Outputs + (SubGrammar:: grammar.Grammar) + "}" /ws ws = grammar.ws -ts = ts:: ws! tests ws! -tests = test */ ws -test = tca:: "testcase" "{" input (o::(output +/ ws)) (grammaro::grammar.Grammar) "}" /ws - | tcb:: "testcase" "{" input (grammaro::grammar.Grammar) "}" /ws -output = "output" grammar.Quoted ";" /ws -input = "input" grammar.Quoted ";" /ws