13f4cf162e
* move grafana-build into pkg/build
23 lines
432 B
Go
23 lines
432 B
Go
package msi_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/grafana/grafana/pkg/build/daggerbuild/msi"
|
|
)
|
|
|
|
func TestVersion(t *testing.T) {
|
|
tests := map[string]string{
|
|
"1.2.3+security-01": "1.2.3.01",
|
|
"1.2.3-beta1": "1.2.3.1",
|
|
"1.2.3": "1.2.3.0",
|
|
}
|
|
|
|
for input, expect := range tests {
|
|
res := msi.WxsVersion(input)
|
|
if res != expect {
|
|
t.Fatalf("for '%s' got '%s', expected '%s'", input, res, expect)
|
|
}
|
|
}
|
|
}
|