Tim Vahlbrock
12/10/2024, 7:08 AM/.{1,4}/
to just assert that a string has a certain length. The dot also includes unicode characters, which is intentional. Pact-JVM saves Unicode characters in the contract file using a backslash escape notation, like \uDAA5
for a surrogate, even though the file is UTF-8. However, the Pact CLI Tools seem not to be able to handle some of those sequence. By example, the surrogate escape causes the throw of "incomplete surrogate pair at '\uDAA5". Where lies the problem here? Should Pact-JVM just use the actual values or should the CLI tools be able to handle the escaped sequences?Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Tim Vahlbrock
12/11/2024, 7:31 AMTim Vahlbrock
12/11/2024, 2:27 PMTim Vahlbrock
01/06/2025, 11:20 AM\uDAA5
(a high surrogate) which in valid unicode should be followed by a low surrogate. This sequence was generated by pact-jvm's regex generator. The corresponding library is also unmaintained since at least 5 years. Opened an issue on the pact-jvm repo: https://github.com/pact-foundation/pact-jvm/issues/1848rholshausen
01/06/2025, 10:01 PMTim Vahlbrock
01/07/2025, 9:20 AM.{9}
in the contract tests but actually just support [a-Z0-9]
this wouldn't be caught by pact as long as the example value I provide matches [a-Z0-9]
. Of course this may still happen with a working generator, as long as I CAN provide an example.