Libraryless. Click here for Pure Java version (5362L/33K).
1 | svoid test_agiBlue_parseQueryScript() { |
2 | assertEqualsVerbose(unstruct([=[ [ALQLTriple(triple=T3(a="word types", b="is plural of", c="$x")), ALQLTriple(triple=T3(a="$y", b="is a", c="$x")), ALQLReturn(var="$y")] ]=]), |
3 | agiBlue_parseQueryScript([[ |
4 | word types / is plural of / $x |
5 | $y / is a / $x |
6 | return $y |
7 | ]])); |
8 | |
9 | assertEqualsVerbose(unstruct([=[ [ALQLLockStatement(triple=T3(a="word types", b="is plural of", c="*"))] ]=]), |
10 | agiBlue_parseQueryScript([[ |
11 | lock { word types / is plural of / * } |
12 | ]])); |
13 | |
14 | assertEqualsVerbose(unstruct([=[ [ALQLPage(page="delete slice $x", matchMethod="flexMatchDollarVarsIC_first")] ]=]), |
15 | agiBlue_parseQueryScript([[ |
16 | page { delete slice $x } |
17 | ]])); |
18 | |
19 | assertEqualsVerbose(unstruct([=[ [ALQLPage(page="bla", matchMethod="eqic")] ]=]), |
20 | agiBlue_parseQueryScript([[ |
21 | page { bla } |
22 | ]])); |
23 | |
24 | assertEqualsVerbose(unstruct([=[ [ |
25 | ALQLSlice(slice="hello", contents=[ |
26 | ALQLPage(page="bla", matchMethod="eqic"), |
27 | ALQLPage(page="blubb", matchMethod="eqic") |
28 | ])] ] ]=]), |
29 | agiBlue_parseQueryScript([[ |
30 | slice "hello" { |
31 | page { bla } |
32 | page { blubb } |
33 | } |
34 | ]])); |
35 | |
36 | // tuple return |
37 | assertEqualsVerbose(unstruct([=[ [ALQLReturnTuple(vars=["$x", "$y"])] ]=]), |
38 | agiBlue_parseQueryScript([[ |
39 | return $x, $y |
40 | ]])); |
41 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024263 |
Snippet name: | test_agiBlue_parseQueryScript (usually OK) |
Eternal ID of this version: | #1024263/14 |
Text MD5: | 04f401950e58095b774073b9d65cec2a |
Transpilation MD5: | f76449642d0471fac0ba07412c4a6362 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-03 16:58:19 |
Source code size: | 1397 bytes / 41 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 206 / 334 |
Version history: | 13 change(s) |
Referenced in: | [show references] |