15 lines
249 B
Go
15 lines
249 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestParseVersion(t *testing.T) {
|
|
major, minor, patch, err := parseVersion("v0.0.0", "v")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if major != 0 || minor != 0 || patch != 0 {
|
|
t.Fatal("version does not match")
|
|
}
|
|
}
|