Skip to content

Normalization can make a mismatch around regex #30

@m1kit

Description

@m1kit

I found a very minor corner case in dynamically generated test cases.

Given a regex .{,20} the random test generator generates a string like this:

B_V$n<?2.M0$@1CjSjyt

I expected this string to match the regular expression.

However, the normalizer normalizes the string like this:

b-`v$n<?2.`m0$@1cjsjyt

Note that there are two spaces inserted after _ and ..

This normalization process itself is expected behavior, but this normalized string does not match to the regex. This is because the length of the string is increased to 22 by two spaces.

Hi @goneall @anshuldutt21, please let me know your feelings on this issue.
I think this is a very minor issue and we may ignore. Instead, we can change a way to generate random tests (like treat a pattern . as [a-zA-Z0-9]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions