Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rusq
Copy link

@rusq rusq commented Dec 19, 2025

Fixes #35.

Introduces a new error ErrIncompleteExpr that is returned if the provided expression is unterminated.

It seems we expect the number buffer to be cleared if all terms are properly parsed, and if not - it means that the expression is missing a term.

name: "no unit after prefix P",
args: args{d: "P6"},
want: nil,
wantErr: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not your fault but the existing unit tests are not able to check if the error returned is the specific one we might expect to have.

Maybe a slight refactoring of this unit tests to call errors.Is is some conditions would help.

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.

ISO-8601 strings with no/missing units don't return an error

2 participants