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

Constant values in expressions don't abide by the case sensitivity option #23

Closed
bijington opened this issue Jun 25, 2018 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@bijington
Copy link
Owner

It seems that the majority of constant values can be case insensitive apart from null. Really the parser should abide by the ExpressiveOptions.IgnoreCase flag however this could now be a breaking change. For now it is likely that we just make null case insensitive to at least be consistent with the rest.

A test to prove the issue:

[TestMethod]
public void ShouldHandleNullCaseInsensitive()
{
    var arguments = new Dictionary<string, object>
    {
        ["plate.datecontrol"] = null,
    };

    Assert.AreEqual("Date Needed", new Expression("if([plate.datecontrol] = NULL, 'Date Needed', 'Date Entered')", ExpressiveOptions.IgnoreCase).Evaluate(arguments));
}
@bijington bijington self-assigned this Jun 25, 2018
@bijington bijington added the bug label Jun 25, 2018
@bijington bijington added this to the Next Release milestone Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant