--- parser3/tests/results/388-sql.processed 2017/12/07 00:55:12 1.2 +++ parser3/tests/results/388-sql.processed 2024/12/12 20:30:36 1.18 @@ -1,30 +1,88 @@ -Content-Type: text/html -Content-Length: 2755 +Content-Type: text/html +Content-Length: 4662 + -1. 2 + 2 = 4 -2. void -2.1 2.2 2.3 Type: parser.runtime, -Source: sqlite://****, -Comment: must return nothing -2.4 Type: parser.runtime, -Source: sql, -Comment: called with invalid option -2.5 Type: sql.execute, -Source: query, -Comment: bind variables not supported yet -3. int/double -3.1 2 int -3.2 Type: parser.runtime, -Source: sql, -Comment: produced no result, but no default option specified -3.3 1 -3.4 -2 double -3.5 Type: parser.runtime, -Source: sql, -Comment: produced no result, but no default option specified -3.6 1 -4. hash -4.1 { + + + 1. 2 + 2 = 4 + + + 2. void + + 2.1 + + + + + + 2.3 + + Exception type: sql.execute, + Source: select * from pets, + Comment: must return nothing + + 2.4 + + Exception type: parser.runtime, + Source: sql, + Comment: called with invalid option + + 2.5 + + Exception type: sql.execute, + Source: query, + Comment: bind variables not supported yet + + + 2.6 Multiple queries: + 2.8 Multiple queries, data in first query: + + Exception type: sql.execute, + Source: select 2+2 ; delete from pets where pet='', + Comment: must return nothing + + 2.9 Multiple queries, data in second query: + + Exception type: sql.execute, + Source: delete from pets where pet='' ; select 2+2, + Comment: must return nothing + + + + 3. int/double + + 3.1 2 int + 3.2 + + Exception type: parser.runtime, + Source: sql, + Comment: produced no result, but no default option specified + + 3.3 1 + + 3.4 -2 double + 3.5 + + Exception type: parser.runtime, + Source: sql, + Comment: produced no result, but no default option specified + + 3.6 1 + + 3.7 Multiple queries, data in first query: 4 + 3.8 Multiple queries, data in second query: 4 + 3.9 Multiple queries, data in both queries: + + Exception type: sql.execute, + Source: select 2+2 ; select 3+3 , + Comment: result must contain exactly one column + + + + 4. hash + + 4.1 + { "cat":{ "food":"milk", "aggressive":"'very'", @@ -35,47 +93,135 @@ Comment: produced no result, but no defa "aggressive":"\"never\"", "weigth":"10" }, + "hamster":{ + "food":"grain", + "aggressive":"", + "weigth":"1" + }, "parrot":{ "food":"grain", "aggressive":"alwayws", "weigth":"1" } } -4.2 { + + 4.2 + { "cat":[ {"pet":"cat","food":"milk","aggressive":"'very'","weigth":"5"} ], "dog":[ {"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"} ], + "hamster":[ + {"pet":"hamster","food":"grain","aggressive":"","weigth":"1"} + ], "parrot":[ {"pet":"parrot","food":"grain","aggressive":"alwayws","weigth":"1"} ] } -4.3 { + + 4.3 + { "cat":"milk", "dog":"bone", + "hamster":"grain", "parrot":"grain" } -4.4 Type: parser.runtime, -Source: sqlite://****, -Comment: only 2 columns allowed for $.type[string]. -4.5. { + + 4.4 + + Exception type: sql.execute, + Source: select * from pets, + Comment: only 2 columns allowed for $.type[string] + + + 4.5. + { "dog":[ {"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"} ] } -5. table -5.1 [ + + 4.6 + + Exception type: sql.execute, + Source: select 'dup', pet from pets, + Comment: duplicate key + + + 4.7 + { + "cat":true, + "dog":true, + "hamster":true, + "parrot":true +} + + 4.7.1 + { + "'very'":true, + "\"never\"":true, + "":true, + "alwayws":true +} + + 4.8 + { + "milk":[ + {"id":"milk","pet":"cat"} + ], + "bone":[ + {"id":"bone","pet":"dog"} + ], + "grain":[ + {"id":"grain","pet":"hamster"}, + {"id":"grain","pet":"parrot"} + ] +} + + 4.9 + { + "milk":"cat", + "bone":"dog", + "grain":"hamster" +} + + + 5. table + + 5.1 + [ {"pet":"cat","food":"milk","aggressive":"'very'","weigth":"5"}, {"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"}, + {"pet":"hamster","food":"grain","aggressive":"","weigth":"1"}, {"pet":"parrot","food":"grain","aggressive":"alwayws","weigth":"1"} ] -5.2. [ + + 5.2. + [ {"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"} ] -6. file -6.1 { + + 5.3 + + Exception type: sql.execute, + Source: select * from pets, + Comment: bind variables not supported yet + + + 5.4 + + Exception type: parser.runtime, + Source: sql, + Comment: called with invalid option + + + + 6. file + + 6.1 + { "class":"file", "name":"test.txt", "size":6, @@ -83,7 +229,9 @@ Comment: only 2 columns allowed for $.ty "content-type":"text\/plain", "text":"'very'" } -6.2 { + + 6.2 + { "class":"file", "name":"unknown", "size":7, @@ -91,41 +239,76 @@ Comment: only 2 columns allowed for $.ty "content-type":"unknown", "text":"\"never\"" } -6.3 Type: parser.runtime, -Source: sqlite://****, -Comment: result must contain not more then 3 columns -6.4 Type: parser.runtime, -Source: sql, -Comment: produced no result -6.5 { - "class":"file", - "name":"1", - "size":1, - "mode":"binary", - "content-type":"1", - "text":"1" -} - bug! -6.6 Type: parser.runtime, -Source: sqlite://****, -Comment: result must not contain more then one row, three columns -6.7 Type: parser.runtime, -Source: sql, -Comment: called with invalid option -6.8 "''test''" -7. string -7.1 Type: parser.runtime, -Source: sqlite://****, -Comment: result must contain exactly one column -7.2 Type: parser.runtime, -Source: sqlite://****, -Comment: result must not contain more then one row -7.3 Type: sql.execute, -Source: select 2+2, -Comment: bind variables not supported yet -7.4 Type: parser.runtime, -Source: sql, -Comment: called with invalid option -7.5 Type: parser.runtime, -Source: sql, -Comment: produced no result, but no default option specified -7.6 "default" + + 6.3 + + Exception type: sql.execute, + Source: select * from pets, + Comment: result must contain no more than 3 columns + + + 6.4 + + Exception type: parser.runtime, + Source: sql, + Comment: produced no result + + + 6.5 + + Exception type: sql.execute, + Source: select 1 from pets, + Comment: result must contain no more than 1 row + + + 6.6 + + Exception type: sql.execute, + Source: select 1,2 from pets, + Comment: result must contain no more than 1 row + + + 6.7 + + Exception type: parser.runtime, + Source: sql, + Comment: called with invalid option + + + 6.8 "''test''" + + 7. string + + 7.1 + + Exception type: sql.execute, + Source: select * from pets, + Comment: result must contain exactly one column + + 7.2 + + Exception type: sql.execute, + Source: select pet from pets, + Comment: result must contain no more than one row + + 7.3 + + Exception type: sql.execute, + Source: select 2+2, + Comment: bind variables not supported yet + + 7.4 + + Exception type: parser.runtime, + Source: sql, + Comment: called with invalid option + + 7.5 + + Exception type: parser.runtime, + Source: sql, + Comment: produced no result, but no default option specified + + 7.6 + "default" +