Diag input and output for unexpected success
[dbsrgits/SQL-Abstract.git] / t / 11parser.t
index 7cf6509..3c60c95 100644 (file)
@@ -811,7 +811,7 @@ is_deeply($sqlat->parse('SELECT foo FROM bar ORDER BY x + ? DESC, oomph, y - ? D
   ]
 ], 'Crazy ORDER BY parsed correctly');
 
-is_deeply( $sqlat->parse("META SELECT * * FROM (SELECT *, FROM foobar baz buzz) foo bar WHERE NOT NOT NOT EXISTS (SELECT 'cr,ap') AND foo.a = ? STUFF moar(stuff) and not (foo.b LIKE 'station') and x = y and a = b and GROUP BY , ORDER BY x x1 x2 y asc, max(y) desc x z desc"), [
+is_deeply( $sqlat->parse("META SELECT * * FROM (SELECT *, FROM foobar baz buzz) foo bar WHERE NOT NOT NOT EXISTS (SELECT 'cr,ap') AND foo.a = ? STUFF moar(stuff) and not (foo.b LIKE 'station') and x = y and z in ((1, 2)) and a = b and GROUP BY , ORDER BY x x1 x2 y asc, max(y) desc x z desc"), [
   [
     "-LITERAL",
     [
@@ -1047,6 +1047,44 @@ is_deeply( $sqlat->parse("META SELECT * * FROM (SELECT *, FROM foobar baz buzz)
             ]
           ],
           [
+            'IN',
+            [
+              [
+                '-LITERAL',
+                [
+                  'z',
+                ],
+              ],
+              [
+                '-PAREN',
+                [
+                  [
+                    '-PAREN',
+                    [
+                      [
+                        '-LIST',
+                        [
+                          [
+                            '-LITERAL',
+                            [
+                              '1'
+                            ]
+                          ],
+                          [
+                            '-LITERAL',
+                            [
+                              '2'
+                            ]
+                          ],
+                        ],
+                      ],
+                    ],
+                  ],
+                ],
+              ],
+            ],
+          ],
+          [
             "=",
             [
               [