-
Notifications
You must be signed in to change notification settings - Fork 387
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
Fix for negative feet/inch parsing #674
Conversation
Looks good to me, only a failing test case. |
Oops. I put "- 1′ 1″ " when I meant " -1′ 1″ ". Multi-line added the negative sign :) Fixed That said, should "- 1′ 1″ "work? |
I don't know, but my intuition tells me we shouldn't have to support something like that. We have been bit previously by trying to be too lenient in parsing all sorts of input. |
[InlineData( "-1 ft 1 in", -1.08333333 )] | ||
[InlineData( "-1ft 1in", -1.08333333 )] | ||
[InlineData("-1'", 1)] // Feet only | ||
[InlineData("-1′", 1)] // Feet only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, what? Shouldn't expectedFeet
still be negative 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha I re-copied-and-pasted. It's been a long day :) fixed
Looks good now :-) green tests too! |
Would you publish a new release too, please? |
Will do |
Fix for #673.