add tests for + - followed by comment edge cases
This commit is contained in:
parent
fc2119be02
commit
47198c78c1
2 changed files with 9 additions and 2 deletions
tools/Language/SQL/SimpleSQL
|
@ -284,7 +284,9 @@ the + or -.
|
|||
> [LexerTest postgres s t | (s,t) <- postgresLexerTable]
|
||||
> ,Group "adhoc lexer tests" $
|
||||
> [LexerTest postgres s t
|
||||
> | (s,t) <- edgeCaseCommentOps ++ edgeCasePlusMinusOps ]
|
||||
> | (s,t) <- edgeCaseCommentOps
|
||||
> ++ edgeCasePlusMinusOps
|
||||
> ++ edgeCasePlusMinusComments]
|
||||
> ]
|
||||
> where
|
||||
> edgeCaseCommentOps = concat
|
||||
|
@ -298,6 +300,12 @@ the + or -.
|
|||
> , (x ++ "-", [Symbol x, Symbol "-"]) ]
|
||||
> | x <- somePostgresOpsWhichWontAddTrailingPlusMinus 2
|
||||
> ]
|
||||
> edgeCasePlusMinusComments =
|
||||
> [("---", [LineComment "---"])
|
||||
> ,("+--", [Symbol "+", LineComment "--"])
|
||||
> ,("-/**/", [Symbol "-", BlockComment "/**/"])
|
||||
> ,("+/**/", [Symbol "+", BlockComment "/**/"])
|
||||
> ]
|
||||
|
||||
|
||||
> combos :: [a] -> Int -> [[a]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue