X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F11parser.t;h=5ce1a8021a4362f13e81c14e69828c003d690312;hb=08e1636016045f0f3881f5af287dcfd482845fe9;hp=3c60c953a03b400b1045dc4fb24fc612d7b5a2d7;hpb=4c120a34df5e6fb6e2a8f1668d9ea4df2bd8639a;p=scpubgit%2FQ-Branch.git diff --git a/t/11parser.t b/t/11parser.t index 3c60c95..5ce1a80 100644 --- a/t/11parser.t +++ b/t/11parser.t @@ -533,6 +533,50 @@ is_deeply($sqlat->parse( "SELECT [screen].[id], [screen].[name], [screen].[secti ] ], 'real life statement 1 parsed correctly'); +is_deeply($sqlat->parse("CASE WHEN FOO() > BAR()"), [ + [ + "-MISC", + [ + [ + "-LITERAL", + [ + "CASE" + ] + ], + [ + "-LITERAL", + [ + "WHEN" + ] + ] + ] + ], + [ + ">", + [ + [ + "FOO", + [ + [ + "-PAREN", + [] + ] + ] + ], + [ + "BAR", + [ + [ + "-PAREN", + [] + ] + ] + ] + ] + ] +]); + + is_deeply($sqlat->parse("SELECT x, y FROM foo WHERE x IN (?, ?, ?, ?)"), [ [ "SELECT",