fix: escape CJK literals in test to satisfy gosmopolitan linter

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dj-oyu 2026-03-20 10:28:33 +09:00
parent a28370e4e3
commit c7648ee11f

View file

@ -178,25 +178,26 @@ func TestProcessPDFs_NilOCR(t *testing.T) {
}
}
//nolint:gosmopolitan // intentional CJK test data for Japanese reading order detection
func TestDetectReadingOrder(t *testing.T) {
tests := []struct {
content string
cfgDefault string
want string
}{
{"この文書を読んで", "", "auto"},
{"縦書きで読んで", "", "right2left"},
{"横書きのPDF", "", "top2bottom"},
{"\u3053\u306e\u6587\u66f8\u3092\u8aad\u3093\u3067", "", "auto"},
{"\u7e26\u66f8\u304d\u3067\u8aad\u3093\u3067", "", "right2left"},
{"\u6a2a\u66f8\u304d\u306ePDF", "", "top2bottom"},
{"vertical layout", "", "right2left"},
{"horizontal doc", "", "top2bottom"},
{"right2left please", "", "right2left"},
{"top2bottom mode", "", "top2bottom"},
{"left2right table", "", "left2right"},
{"たてがきの文書", "", "right2left"},
{"よこがきの文書", "", "top2bottom"},
{"\u305f\u3066\u304c\u304d\u306e\u6587\u66f8", "", "right2left"},
{"\u3088\u3053\u304c\u304d\u306e\u6587\u66f8", "", "top2bottom"},
{"plain message", "right2left", "right2left"},
{"plain message", "", "auto"},
{"縦書き", "top2bottom", "right2left"}, // message keyword overrides config default
{"\u7e26\u66f8\u304d", "top2bottom", "right2left"}, // message keyword overrides config default
}
for _, tt := range tests {
if got := detectReadingOrder(tt.content, tt.cfgDefault); got != tt.want {