Skip to content

Commit

Permalink
Merge pull request Masterminds#118 from mattfarina/more-constraint-st…
Browse files Browse the repository at this point in the history
…rings

Add more constraint string testing
  • Loading branch information
mattfarina committed Sep 9, 2019
2 parents 243130d + 041cca6 commit 7f96b0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions constraints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,5 +639,9 @@ func TestConstraintString(t *testing.T) {
if c.String() != tc.st {
t.Errorf("expected constraint from %q to be a string as %q but got %q", tc.constraint, tc.st, c.String())
}

if _, err = NewConstraint(c.String()); err != nil {
t.Errorf("expected string from constrint %q to parse as valid but got err: %s", tc.constraint, err)
}
}
}

0 comments on commit 7f96b0d

Please sign in to comment.