package app import ( "regexp" "testing" "github.com/gogf/gf/v2/os/gtime" ) func TestAppOrderNoMatchesBatchNoFormat(t *testing.T) { now := gtime.NewFromStr("2026-07-09 16:47:15") got := appOrderNo("SO", 875, now) want := regexp.MustCompile(`^SO20260709164715[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{8}$`) if !want.MatchString(got) { t.Fatalf("order no = %q, want SO + yyyyMMddHHmmss + 8 chars", got) } }