From e2b0d1366f79103ec54c9001c0454980a5074fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Sun, 18 Oct 2026 22:22:36 +0200 Subject: [PATCH] process: write unicode spaces in command line test as escapes (#2784) Co-authored-by: Claude Signed-off-by: Claude --- AGENTS.md | 4 ++++ internal/collector/process/apppool_test.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 0eb8d1e8..0c0d6818 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -105,6 +105,10 @@ tests for behavior changes and benchmarks for performance improvements. Check actual emitted metric values, types and labels through registry gathering; configuration or struct assertions alone do not prove publication is correct. +Write invisible or non-ASCII whitespace in source and test data as Go escapes +(`\u00a0`, `\u3000`, `\u200b`), never as literal characters. Renovate warns about +hidden Unicode on `main`, and literals are hard to review. + Read [`docs/ci-testing.md`](docs/ci-testing.md) before changing fixtures or test skip rules. `WINDOWS_EXPORTER_TEST_COLLECTORS` lists collectors provisioned by CI; their failures must fail tests. Optional roles may be absent locally. Report diff --git a/internal/collector/process/apppool_test.go b/internal/collector/process/apppool_test.go index 1648c099..d93e5636 100644 --- a/internal/collector/process/apppool_test.go +++ b/internal/collector/process/apppool_test.go @@ -68,7 +68,7 @@ var commandLineTests = []struct { {"control character after program", "a \vb", []string{`a`, "\vb"}}, {"control character after quoted program", "\"a\"\vb", []string{`a`, "\vb"}}, {"control character in argument", "a b\vc\nd", []string{`a`, "b\vc\nd"}}, - {"unicode spaces", "a b c d", []string{"a b", "c d"}}, + {"unicode spaces", "a\u00a0b c\u3000d", []string{"a\u00a0b", "c\u3000d"}}, {"three quotes", `a """b c`, []string{`a`, `"b`, `c`}}, {"unicode", `a "Café Пул ✓ Ωμέγα" b`, []string{`a`, `Café Пул ✓ Ωμέγα`, `b`}}, {"was command line", wasCommandLine, []string{