From c7648ee11f2bf4befa49c011a2bf1c9fbe67488d Mon Sep 17 00:00:00 2001 From: dj-oyu <68707227+dj-oyu@users.noreply.github.com> Date: Fri, 20 Mar 2026 10:28:33 +0900 Subject: [PATCH] fix: escape CJK literals in test to satisfy gosmopolitan linter Co-Authored-By: Claude Opus 4.6 (1M context) --- pkg/agent/loop_media_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/agent/loop_media_test.go b/pkg/agent/loop_media_test.go index 58a168b71..613935c37 100644 --- a/pkg/agent/loop_media_test.go +++ b/pkg/agent/loop_media_test.go @@ -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 {