Skip to content

Mask out results before comparing #79

@julianhyde

Description

@julianhyde

It would be useful if Quidem had a way to mask out results. For example, the following test (from CALCITE-6021) calls the CURRENT_DATETIME function, which returns a value that has a particular format but is different every time:

!mask 6 "[0-9]" "x"
SELECT CURRENT_DATETIME as now;
+----------------------------+
| now                        |
+----------------------------+
| 2016-05-19T10:38:47.046465 |
+----------------------------+
(1 row)

!ok

The test would succeed because '2016-05-19T10:38:47.046465' and '2023-11-11T16:38:47.012345' would both be converted to 'xxxx-xx-xxTxx:xx:xx.xxxxxx'.

The 6 means 'the next 6 lines'. The next argument is a Java regex. The following argument is a Java replacement string. As usual in Java regex, you can include '^' and '$' in the regex if you want to match the whole string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions