MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / TestDisplayVersion

Function TestDisplayVersion

cmd/root_test.go:283–301  ·  view source on GitHub ↗

── displayVersion ──────────────────────────────────────────────────────────

(t *testing.T)

Source from the content-addressed store, hash-verified

281// ── displayVersion ──────────────────────────────────────────────────────────
282
283func TestDisplayVersion(t *testing.T) {
284 tests := []struct {
285 input string
286 want string
287 }{
288 {"1.2.3", "v1.2.3"},
289 {"v1.2.3", "v1.2.3"},
290 {"V1.2.3", "V1.2.3"},
291 {"", "unknown"},
292 {" ", "unknown"},
293 {" 1.0.0 ", "v1.0.0"},
294 }
295
296 for _, tt := range tests {
297 t.Run(tt.input, func(t *testing.T) {
298 assert.Equal(t, tt.want, displayVersion(tt.input))
299 })
300 }
301}
302
303// ── isPMManaged / detectPackageManager ──────────────────────────────────────
304// These are already tested in update_test.go but we add a few edge cases.

Callers

nothing calls this directly

Calls 1

displayVersionFunction · 0.85

Tested by

no test coverage detected