MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestGetCopyrightYearRange

Function TestGetCopyrightYearRange

internal/version/version_test.go:162–180  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

160}
161
162func TestGetCopyrightYearRange(t *testing.T) {
163 yearRange := GetCopyrightYearRange()
164 currentYear := time.Now().Year()
165
166 // Should contain the current year
167 if !strings.Contains(yearRange, fmt.Sprintf("%d", currentYear)) {
168 t.Errorf("GetCopyrightYearRange() should contain current year %d, got: %s", currentYear, yearRange)
169 }
170
171 // Should be in expected format (either "2025" or "2025-2026")
172 if !strings.Contains(yearRange, "2025") {
173 t.Errorf("GetCopyrightYearRange() should contain start year 2025, got: %s", yearRange)
174 }
175
176 // Should not be empty
177 if yearRange == "" {
178 t.Error("GetCopyrightYearRange() should not return empty string")
179 }
180}

Callers

nothing calls this directly

Calls 2

GetCopyrightYearRangeFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected