@@ -0,0 +1,23 @@
|
||||
package utils
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestYmhutWinUIInstallerAliasesMatchLegacyInstaller(t *testing.T) {
|
||||
cases := []string{
|
||||
"YMhut_Box_WinUI_Setup_2.0.6.0.exe",
|
||||
"YMhut_Box_Setup_2.0.5.exe",
|
||||
}
|
||||
|
||||
for _, fileName := range cases {
|
||||
productName, version, _, ok := parsePackageFileName(fileName)
|
||||
if !ok {
|
||||
t.Fatalf("expected %s to be parsed", fileName)
|
||||
}
|
||||
if !IsSameProduct(productName, "YMhut Box") {
|
||||
t.Fatalf("expected %q from %s to match YMhut Box", productName, fileName)
|
||||
}
|
||||
if version == "" {
|
||||
t.Fatalf("expected version from %s", fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user