Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex no longer working correctly with | (or) symbol #511

Closed
CoolsJoris opened this issue Aug 26, 2019 · 2 comments
Closed

Regex no longer working correctly with | (or) symbol #511

CoolsJoris opened this issue Aug 26, 2019 · 2 comments

Comments

@CoolsJoris
Copy link

CoolsJoris commented Aug 26, 2019

Hi,

Regex no longer works as expected.
As simple regex checking on a single character works, when you start using | to specify or it stops working.

The following works (simple regex)

<assert>
  <all-rows>
    <predicate operand="[Column]" type="text">
      <matches-regex not="true">([ ]){17}</matches-regex>
    </predicate>
  </all-rows>
</assert>

The following doesn't work.

<assert>
  <all-rows>
    <predicate operand="[Column]" type="text">
      <matches-regex>([A-Z]| |\d|[+]|[-]|[%]|[*]){17}</matches-regex>
    </predicate>
  </all-rows>
</assert>

The error i get is the following:
NBi.NUnit.Runtime.TestSuite.TestName:
NBi.Core.Transformation.Transformer.Native.NotImplementedTransformationException : The native transformation named '' is not implemented in this version of NBi

I have this issue in the following version. (could have been even earlier)

  • 1.21.0-beta.244
  • 1.21.0-beta.286

thanks in advance.

@Seddryck Seddryck added the bug label Aug 26, 2019
@Seddryck
Copy link
Owner

Seddryck commented Aug 26, 2019

This is a not-anticipated side effect of #494. The pipe symbol (|) is interpreted as a separator for the native transformations.

I propose to add a feature that if the value is starting AND ending by a grave symbol (`) then the value is a literal. That means that it's not fully retro-compatible, but the cases where a change would be required are minimal.

<matches-regex>`([A-Z]| |\d|[+]|[-]|[%]|[*]){17}`</matches-regex>

@Seddryck Seddryck added this to the v1.21 milestone Aug 26, 2019
@Seddryck
Copy link
Owner

Beta available at https://ci.appveyor.com/project/Seddryck/nbi/builds/26970850/artifacts or 1.21.0-beta0287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants