package version import ( "regexp" "testing" "github.com/stretchr/testify/assert" ) func TestStringConstant(t *testing.T) { // Test that the version constant is not empty assert.NotEmpty(t, String, "version.String should not be empty") } func TestStringMatchesSemVer(t *testing.T) { // Test that the version string matches semantic versioning pattern (major.minor.patch) semverPattern := `^\d+\.\d+\.\d+$` matched, err := regexp.MatchString(semverPattern, String) assert.NoError(t, err, "regex should be valid") assert.True(t, matched, "version.String should match semantic versioning pattern (major.minor.patch), got: %s", String) }