MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestNormalizeVersion

Function TestNormalizeVersion

internal/update/update_test.go:147–163  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

145}
146
147func TestNormalizeVersion(t *testing.T) {
148 tests := []struct {
149 input, expected string
150 }{
151 {"v0.5.0", "0.5.0"},
152 {"0.5.0", "0.5.0"},
153 {"v1.0.0-beta", "1.0.0-beta"},
154 {"dev", "dev"},
155 }
156
157 for _, tc := range tests {
158 result := normalizeVersion(tc.input)
159 if result != tc.expected {
160 t.Errorf("normalizeVersion(%q) = %q, want %q", tc.input, result, tc.expected)
161 }
162 }
163}
164
165func TestBaseVersion(t *testing.T) {
166 tests := []struct {

Callers

nothing calls this directly

Calls 1

normalizeVersionFunction · 0.85

Tested by

no test coverage detected