mirror of
https://github.com/status-im/status-go.git
synced 2025-01-11 07:07:24 +00:00
add test to check that version doesn't start with v
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
98c861cfe2
commit
74e553b847
19
params/version_test.go
Normal file
19
params/version_test.go
Normal file
@ -0,0 +1,19 @@
|
||||
package params_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestVersionFormat(t *testing.T) {
|
||||
data, err := ioutil.ReadFile(filepath.Join("..", "VERSION"))
|
||||
if err != nil {
|
||||
t.Error("unable to open VERSION file")
|
||||
}
|
||||
matched, _ := regexp.Match(`^\d+\.\d+\.\d+(-[.\w]+)?\n?$`, data)
|
||||
if !matched {
|
||||
t.Error("version in incorrect format")
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user