I have this code using Xeger package 2.2.1 that I used to test an AutoFixture call that is often crashing (this RegEx is normally in a RegularExpressionAttribute annotation).
new Fare.Xeger(@"^\s*[0-9\s]{0,6}\s*$").Generate();
that generates this C# string.
" s\t \t "
Obviously, the character "s" is not valid using this RegEx.
To reproduce, I called the previous code multiple time in the Execution window in Visual Studio 2022. The global results were
new Fare.Xeger(@"^\s*[0-9\s]{0,6}\s*$").Generate();
""
new Fare.Xeger(@"^\s*[0-9\s]{0,6}\s*$").Generate();
""
new Fare.Xeger(@"^\s*[0-9\s]{0,6}\s*$").Generate();
" s\t \t "
new Fare.Xeger(@"^\s*[0-9\s]{0,6}\s*$").Generate();
"4\t\t"
NB
Note how the [0-9\s] part is almost never used. This seems bad in a randomized context.
I have this code using Xeger package 2.2.1 that I used to test an AutoFixture call that is often crashing (this RegEx is normally in a RegularExpressionAttribute annotation).
new Fare.Xeger(@"^\s*[0-9\s]{0,6}\s*$").Generate();
that generates this C# string." s\t \t "
Obviously, the character "s" is not valid using this RegEx.
To reproduce, I called the previous code multiple time in the Execution window in Visual Studio 2022. The global results were
NB Note how the [0-9\s] part is almost never used. This seems bad in a randomized context.