mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-19 11:09:03 +02:00
process: write unicode spaces in command line test as escapes (#2784)
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
3e8a2c6fe7
commit
e2b0d1366f
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user