diff --git a/version.go b/version.go index d63de6f6..96b7fda1 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( ) // semanticAlphabet -const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-" +const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-." // These constants define the application version and follow the semantic // versioning 2.0.0 spec (http://semver.org/). diff --git a/version_test.go b/version_test.go new file mode 100644 index 00000000..d4e1c286 --- /dev/null +++ b/version_test.go @@ -0,0 +1,19 @@ +// Copyright (c) 2026 The btcsuite developers +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. + +package main + +import "testing" + +// TestNormalizeVerString ensures valid semantic version separators are +// preserved when normalizing pre-release and build metadata strings. +func TestNormalizeVerString(t *testing.T) { + t.Parallel() + + const version = "beta.rc1" + if got := normalizeVerString(version); got != version { + t.Fatalf("unexpected normalized version: got %q, want %q", got, + version) + } +}