grammar_tests/base_tests.json in modl-0.3.16 vs grammar_tests/base_tests.json in modl-0.3.17

- old
+ new

@@ -682,18 +682,18 @@ ], "minimised_modl": "*VERSION=100;test=1" }, { "id": "74", - "input": "*class(\n *id=g;\n *name=glossary;\n *superclass=map\n);\n*class(\n *id=t;\n *name=title;\n *superclass=str\n);\n*class(\n *id=d;\n *name=GlossDiv;\n *superclass=map\n);\n*class(\n *id=l;\n *name=GlossList;\n *superclass=map\n);\n*class(\n *id=e;\n *name=GlossEntry;\n *superclass=map;\n *assign[\n [i;s;gt;a;ab;gd;gs]\n ]\n);\n*class(\n *id=i;\n *name=ID;\n *superclass=str\n);\n*class(\n *id=s;\n *name=SortAs;\n *superclass=str\n);\n*class(\n *id=gt;\n *name=GlossTerm;\n *superclass=str\n);\n*class(\n *id=a;\n *name=Acronym;\n *superclass=str\n);\n*class(\n *id=ab;\n *name=Abbrev;\n *superclass=str\n);\n*class(\n *id=gd;\n *name=GlossDef;\n *superclass=map;\n *assign=[\n [p];\n [p;sa]\n ]\n);\n*class(\n *id=p;\n *name=para;\n *superclass=str\n);\n*class(\n *id=sa;\n *name=SeeAlso;\n *superclass=arr\n);\n*class(\n *id=gs;\n *name=GlossSee;\n *superclass=str\n);\n\ng(\n ?=[SGML;markup;language];\n t=example glossary;\n d(\n t=S;\n l(\n e(\n i=%0;\n s=%0;\n gt=Standard Generalized %1.s %2.s;\n a=%0;\n ab=ISO 8879\\:1986;\n gd=A meta-%1 %2, used to create %1 %2%s such as DocBook.\n :[GML;XML];\n gs=%1\n )\n )\n )\n)", + "input": "*class(\n *id=g;\n *name=glossary;\n *superclass=map\n);\n*class(\n *id=t;\n *name=title;\n *superclass=str\n);\n*class(\n *id=d;\n *name=GlossDiv;\n *superclass=map\n);\n*class(\n *id=l;\n *name=GlossList;\n *superclass=map\n);\n*class(\n *id=e;\n *name=GlossEntry;\n *superclass=map;\n *assign[\n [i;s;gt;a;ab;gd;gs]\n ]\n);\n*class(\n *id=i;\n *name=ID;\n *superclass=str\n);\n*class(\n *id=s;\n *name=SortAs;\n *superclass=str\n);\n*class(\n *id=gt;\n *name=GlossTerm;\n *superclass=str\n);\n*class(\n *id=a;\n *name=Acronym;\n *superclass=str\n);\n*class(\n *id=ab;\n *name=Abbrev;\n *superclass=str\n);\n*class(\n *id=gd;\n *name=GlossDef;\n *assign=[\n [p];\n [p;sa]\n ]\n);\n*class(\n *id=p;\n *name=para;\n *superclass=str\n);\n*class(\n *id=sa;\n *name=SeeAlso;\n *superclass=arr\n);\n*class(\n *id=gs;\n *name=GlossSee;\n *superclass=str\n);\n\ng(\n ?=[SGML;markup;language];\n t=example glossary;\n d(\n t=S;\n l(\n e(\n i=%0;\n s=%0;\n gt=Standard Generalized %1.s %2.s;\n a=%0;\n ab=ISO 8879\\:1986;\n gd=A meta-%1 %2, used to create %1 %2%s such as DocBook.\n :[GML;XML];\n gs=%1\n )\n )\n )\n)", "expected_output": "{\n \"glossary\": {\n \"title\": \"example glossary\",\n \"GlossDiv\": {\n \"title\": \"S\",\n \"GlossList\": {\n \"GlossEntry\": {\n \"ID\": \"SGML\",\n \"SortAs\": \"SGML\",\n \"GlossTerm\": \"Standard Generalized Markup Language\",\n \"Acronym\": \"SGML\",\n \"Abbrev\": \"ISO 8879:1986\",\n \"GlossDef\": {\n \"para\": \"A meta-markup language, used to create markup languages such as DocBook.\",\n \"SeeAlso\": [\n \"GML\",\n \"XML\"\n ]\n },\n \"GlossSee\": \"markup\"\n }\n }\n }\n }\n}", "tested_features": [ "class", "object_ref", "string_method" ], - "minimised_modl": "*c(*i=g;*n=glossary;*s=map);*c(*i=t;*n=title;*s=str);*c(*i=d;*n=GlossDiv;*s=map);*c(*i=l;*n=GlossList;*s=map);*c(*i=e;*n=GlossEntry;*s=map;*a[[i;s;gt;a;ab;gd;gs]]);*c(*i=i;*n=ID;*s=str);*c(*i=s;*n=SortAs;*s=str);*c(*i=gt;*n=GlossTerm;*s=str);*c(*i=a;*n=Acronym;*s=str);*c(*i=ab;*n=Abbrev;*s=str);*c(*i=gd;*n=GlossDef;*s=map;*a=[p]:[p;sa]);*c(*i=p;*n=para;*s=str);*c(*i=sa;*n=SeeAlso;*s=arr);*c(*i=gs;*n=GlossSee;*s=str);g(?=SGML:markup:language;t=example glossary;d(t=S;l(e(i=%0;s=%0;gt=Standard Generalized %1.s %2.s;a=%0;ab=ISO 8879~:1986;gd=A meta-%1 %2, used to create %1 %2%s such as DocBook.:[GML;XML];gs=%1))))" + "minimised_modl": "*c(*i=g;*n=glossary;*s=map);*c(*i=t;*n=title;*s=str);*c(*i=d;*n=GlossDiv;*s=map);*c(*i=l;*n=GlossList;*s=map);*c(*i=e;*n=GlossEntry;*s=map;*a[[i;s;gt;a;ab;gd;gs]]);*c(*i=i;*n=ID;*s=str);*c(*i=s;*n=SortAs;*s=str);*c(*i=gt;*n=GlossTerm;*s=str);*c(*i=a;*n=Acronym;*s=str);*c(*i=ab;*n=Abbrev;*s=str);*c(*i=gd;*n=GlossDef;*a=[p]:[p;sa]);*c(*i=p;*n=para;*s=str);*c(*i=sa;*n=SeeAlso;*s=arr);*c(*i=gs;*n=GlossSee;*s=str);g(?=SGML:markup:language;t=example glossary;d(t=S;l(e(i=%0;s=%0;gt=Standard Generalized %1.s %2.s;a=%0;ab=ISO 8879~:1986;gd=A meta-%1 %2, used to create %1 %2%s such as DocBook.:[GML;XML];gs=%1))))" }, { "id": "75", "input": "_test=1~:2;\n\nresult={\n test=1~:2?\n yes\n /?\n no\n}", "expected_output": "{\n \"result\": \"yes\"\n}", @@ -763,17 +763,17 @@ ], "minimised_modl": "_branch=\"\";_root=\"\";namespace=%branch%numrecord.%root" }, { "id": "82", - "input": "*class(\n *id=desc;\n *name=description;\n *superclass=str\n);\n\n*class(\n *id=val;\n *name=value;\n *superclass=str\n);\n\n*class(\n *id=media1;\n *name=media1;\n *superclass=map;\n *assign=[\n [desc;val]\n ]\n);\n\n*class(\n *id=media2;\n *name=media2;\n *superclass=map;\n *assign=[\n [desc;val]\n ]\n);\n*class(\n *id=list;\n *name=list;\n *superclass=map;\n *assign[\n [media1;media2]\n ]\n);\n\n\nlist=[tel;fb]:[yt;tw]", - "expected_output": "{\n \"list\": {\n \"media1\": {\n \"description\": \"tel\",\n \"value\": \"fb\"\n },\n \"media2\": {\n \"description\": \"yt\",\n \"value\": \"tw\"\n }\n }\n}", + "input": "*class(\n *id=desc;\n *name=description;\n *superclass=str\n);\n\n*class(\n *id=val;\n *name=value;\n *superclass=str\n);\n\n*class(\n *id=media1;\n *name=media1;\n *assign=[\n [desc;val]\n ]\n);\n\n*class(\n *id=media2;\n *name=media2;\n *assign=[\n [desc;val]\n ]\n);\n*class(\n *id=list;\n *name=list;\n *assign[\n [media1;media2]\n ]\n);\n\n\nlist=[tel;fb]:[yt;tw]", + "expected_output": "{\n \"list\": [\n {\n \"description\": \"tel\",\n \"value\": \"fb\"\n },\n {\n \"description\": \"yt\",\n \"value\": \"tw\"\n }\n ]\n}", "tested_features": [ "class", "assign" ], - "minimised_modl": "*c(*i=desc;*n=description;*s=str);*c(*i=val;*n=value;*s=str);*c(*i=media1;*n=media1;*s=map;*a[[desc;val]]);*c(*i=media2;*n=media2;*s=map;*a[[desc;val]]);*c(*i=list;*n=list;*s=map;*a[[media1;media2]]);list=[tel;fb]:[yt;tw]" + "minimised_modl": "*class(*id=desc;*name=description;*superclass=str);*class(*id=val;*name=value;*superclass=str);*class(*id=media1;*name=media1;*assign=[[desc;val]]);*class(*id=media2;*name=media2;*assign=[[desc;val]]);*class(*id=list;*name=list;*assign[[media1;media2]]);list=[tel;fb]:[yt;tw]" }, { "id": "83", "input": "*CLASS(\n *id=p;\n *name=person;\n *SUPERCLASS=map\n);\n\np(name=John Smith;dob=01/01/2000)", "expected_output": "{\n \"person\": {\n \"name\": \"John Smith\",\n \"dob\": \"01/01/2000\"\n }\n}", @@ -3012,13 +3012,31 @@ ], "minimised_modl": "_letters=abc;key=\"\\%letters\"" }, { "id": "316", - "input": "*array(\n *id=p;\n *name=people;\n *of=person\n );\n\n *class(\n *id=n;\n *name=name\n );\n\n *class(\n *id=a;\n *name=age\n );\n\n *class(\n *id=person;\n *assign=[\n [n;a]\n ]\n );\n\n data(\n p[[John;18];[Jane;20]];\n person=[Fred;21]\n );\n p[[Mary;18];[Mungo;19];[Midge;20]];\n person=[Rod;23]\n", - "expected_output": "{\n \"data\": {\n \"people\": [\n {\n \"name\": \"John\",\n \"age\": 18\n },\n {\n \"name\": \"Jane\",\n \"age\": 20\n }\n ],\n \"person\": {\n \"name\": \"Fred\",\n \"age\": 21\n }\n },\n \"people\": [\n {\n \"name\": \"Mary\",\n \"age\": 18\n },\n {\n \"name\": \"Mungo\",\n \"age\": 19\n },\n {\n \"name\": \"Midge\",\n \"age\": 20\n }\n ],\n \"person\": {\n \"name\": \"Rod\",\n \"age\": 23\n }\n}", + "input": "We\\\\u2019re=We\\\\u2019re;You~u2019re=We~u2019re", + "expected_output": "{\n \"We’re\": \"We’re\",\n \"You’re\": \"We’re\"\n}", "tested_features": [ - "*arrays" + "unicode" ], - "minimised_modl": "*array(*id=p;*name=people;*of=person);*class(*id=n;*name=name);*class(*id=a;*name=age);*class(*id=person;*assign=[[n;a]]);data(p[[John;18];[Jane;20]];person=[Fred;21]);p[[Mary;18];[Mungo;19];[Midge;20]];person=[Rod;23]" + "minimised_modl": "We\\\\u2019re=We\\\\u2019re;You~u2019re=We~u2019re" + }, + { + "id": "317", + "input": "*class(\n *id=numbers;\n *assign=[[one;two;three]]\n);\n*class(\n *id=letters;\n *assign=[[a;b;c]]\n);\n*class(\n *id=myArray;\n *assign=[[letters;numbers]]\n);\nmyArray=[[a;b;c];[1;2;3]]", + "expected_output": "{\n \"myArray\": [\n {\n \"a\": \"a\",\n \"b\": \"b\",\n \"c\": \"c\"\n },\n {\n \"one\": 1,\n \"two\": 2,\n \"three\": 3\n }\n ]\n}", + "tested_features": [ + "class" + ], + "minimised_modl": "*class(*id=numbers;*assign=[[one;two;three]]);*class(*id=letters;*assign=[[a;b;c]]);*class(*id=myArray;*assign=[[letters;numbers]]);myArray=[[a;b;c];[1;2;3]]" + }, + { + "id": "318", + "input": "*class(\n *id=root;\n *assign=[[myArray]]\n);\n*class(\n *id=numbers;\n *assign=[[one;two;three]]\n);\n*class(\n *id=letters;\n *assign=[[a;b;c]]\n);\n*class(\n *id=myArray;\n *assign=[[letters;numbers]]\n);\n\n[[a;b;c];[1;2;3]]\n", + "expected_output": "{\n \"myArray\": [\n {\n \"a\": \"a\",\n \"b\": \"b\",\n \"c\": \"c\"\n },\n {\n \"one\": 1,\n \"two\": 2,\n \"three\": 3\n }\n ]\n}", + "tested_features": [ + "class" + ], + "minimised_modl": "*class(*id=root;*assign=[[myArray]]);*class(*id=numbers;*assign=[[one;two;three]]);*class(*id=letters;*assign=[[a;b;c]]);*class(*id=myArray;*assign=[[letters;numbers]]);[[a;b;c];[1;2;3]]" } ] \ No newline at end of file