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

cmp should recognise a string being a negative int #3007

Merged
merged 1 commit into from May 2, 2018

Conversation

james-stocks
Copy link
Contributor

@james-stocks james-stocks commented Apr 30, 2018

fixes #3005

cmp will now compare a negative integer string (e.g. -'12') as the number -12. Previously the - character caused it not to be identified as an integer.

Includes new integration tests

Signed-off-by: James Stocks jstocks@chef.io

Signed-off-by: James Stocks <jstocks@chef.io>
@james-stocks james-stocks requested a review from a team as a code owner April 30, 2018 13:25
@chris-rock chris-rock changed the title (#3005) cmp should recognise a string being a negative int cmp should recognise a string being a negative int May 2, 2018
Copy link
Contributor

@jquick jquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks @james-stocks

Copy link
Contributor

@clintoncwolfe clintoncwolfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks and works well. Thanks!

@clintoncwolfe clintoncwolfe merged commit b42bfeb into inspec:master May 2, 2018
james-stocks pushed a commit to james-stocks/inspec that referenced this pull request May 2, 2018
Signed-off-by: James Stocks <jstocks@chef.io>
james-stocks pushed a commit to james-stocks/inspec that referenced this pull request May 3, 2018
Signed-off-by: James Stocks <jstocks@chef.io>
jquick pushed a commit that referenced this pull request May 3, 2018
Signed-off-by: James Stocks <jstocks@chef.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmp does not recognise a string being a negative int
4 participants