| // Copyright 2018 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func TestSplitVersion(t *testing.T) { |
| for _, tt := range []struct { |
| minor, patch := splitVersion(tt.v) |
| if minor != tt.minor || patch != tt.patch { |
| t.Errorf("splitVersion(%q) = %v, %v; want %v, %v", |
| tt.v, minor, patch, tt.minor, tt.patch) |
| func TestSingleFile(t *testing.T) { |
| files, err := os.ReadDir(".") |
| for _, f := range files { |
| if f.Name() == "releaselet.go" || |
| f.Name() == "README.md" || |
| strings.HasSuffix(f.Name(), "_test.go") { |
| t.Errorf("releaselet should be a single file, found %v", f.Name()) |