InseeFr / Trevas-TS

JavaScript engine for the Validation and Transformation Language
MIT License
9 stars 8 forks source link

`match_characters` return value #97

Closed romaintailhurat closed 2 years ago

romaintailhurat commented 2 years ago

I tested the newly available match_characters function and i think i found a small issue.

Using the storybook, i wrote the following expression:

match_characters(var, expr)

with the bindings:

{
  "var": "test",
  "expr": "[a-z]es[a-z]"
}

The return value is true, with a boolean type.

But with the bindings (es is now et):

{
  "var": "test",
  "expr": "[a-z]et[a-z]"
}

The return value is null, also with a boolean type, where we should have a false return value.

romaintailhurat commented 2 years ago

That was quick! Thanks.