Open mrigger opened 4 years ago
In https://github.com/sqlancer/sqlancer/blob/a195cdd0b4a97cf1113c4bded2e1a41281d4a26a/src/sqlancer/common/query/ExpectedErrors.java, we could do the following:
addRegex
and addAllRegexes
.errorIsExpected
.@albertZhangTJ, do you want to have a look at this issue? I think working on this would be relevant, as we also need to think about how we could generate or specify the list of ExpectedErrors
in your DSL.
To specify the expected error messages for a SQL statement, we currently use
Collection<String>
, see https://github.com/sqlancer/sqlancer/blob/af4374fb62419aed966c074b7888ddc78a98313e/src/sqlancer/Query.java#L27It would be desirable to introduce an abstraction to also allow, for example, specifying regular expressions to cover multiple expected error messages at once, and thus make expected error messages more descriptive (since without using regular expressions, we need to check for the shortest common string).