sync: 同步 v1.0.4 并脱敏配置与镜像

This commit is contained in:
MiFaZhan
2026-10-29 14:36:49 +08:00
parent 743e8e6e6e
commit 2206a393f7
516 changed files with 18119 additions and 2253 deletions
@@ -0,0 +1,26 @@
package model
import (
"strings"
"testing"
)
func TestAllocateInputLimit(t *testing.T) {
for _, test := range []struct {
name string
input string
wantError bool
}{
{"empty", " \r\n\t", true},
{"ignore blanks", "\r\n123\r\n\n456 789 012\n", false},
{"at limit", strings.Repeat("123\n", SimCardAllocateMaxInputRows), false},
{"above limit", strings.Repeat("123\n", SimCardAllocateMaxInputRows+1), true},
} {
t.Run(test.name, func(t *testing.T) {
param := &TSimCardAllocatePrepareParam{Input: test.input}
if err := param.ValidateInput(); (err != nil) != test.wantError {
t.Fatalf("ValidateInput() = %v, wantError = %v", err, test.wantError)
}
})
}
}