Skip to content

Commit e90f6d8

Browse files
committed
add semver trailing CRLF removal testing
1 parent 34cd14c commit e90f6d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/gorepomod/internal/semver/semver_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ func TestParse(t *testing.T) {
3838
v: zero,
3939
errMsg: "\"v1.222\" doesn't have the form v1.2.3",
4040
},
41+
"trailing CRLF": {
42+
raw: "v1.2.3\r\n",
43+
v: SemVer{major: 1, minor: 2, patch: 3},
44+
errMsg: "",
45+
},
4146
}
4247
for n, tc := range testCases {
4348
v, err := Parse(tc.raw)

0 commit comments

Comments
 (0)