对外目录只保留英文主 sku;迁移硬删镜像并校准 1元=100积分;发货页/凭证优先使用 local {sku}.webp。
Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
488 B
Go
24 lines
488 B
Go
package service
|
|
|
|
import "testing"
|
|
|
|
func TestIsLegacyLewanMirrorSKU(t *testing.T) {
|
|
cases := []struct {
|
|
sku string
|
|
want bool
|
|
}{
|
|
{"LEWAN_8EED3610", true},
|
|
{"lewan_abc", true},
|
|
{"Lewan_x", true},
|
|
{"suit_shadow_gothic", false},
|
|
{"pack_dragon_palace", false},
|
|
{"", false},
|
|
{" LEWAN_X ", true},
|
|
}
|
|
for _, tc := range cases {
|
|
if got := IsLegacyLewanMirrorSKU(tc.sku); got != tc.want {
|
|
t.Fatalf("IsLegacyLewanMirrorSKU(%q)=%v want %v", tc.sku, got, tc.want)
|
|
}
|
|
}
|
|
}
|