From d636f4c2136ed9ce06b7fdf7a4816f764cda6bee Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:47:48 -0600 Subject: [PATCH] Clarify comment on CRLF normalization in tests Updated comments in log_test.go to clarify that CRLF is normalized to LF for OS-agnostic test behavior, improving code readability. --- pkg/cmd/agent-task/shared/log_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/agent-task/shared/log_test.go b/pkg/cmd/agent-task/shared/log_test.go index f5913bf4b..586890d9f 100644 --- a/pkg/cmd/agent-task/shared/log_test.go +++ b/pkg/cmd/agent-task/shared/log_test.go @@ -34,7 +34,7 @@ func TestFollow(t *testing.T) { raw, err := os.ReadFile(tt.log) require.NoError(t, err) - // Delete all the `/r` to make the tests OS-agnostic. + // Normalize CRLF to LF to make the tests OS-agnostic. raw = []byte(strings.ReplaceAll(string(raw), "\r\n", "\n")) lines := slices.DeleteFunc(strings.Split(string(raw), "\n"), func(line string) bool { @@ -63,7 +63,7 @@ func TestFollow(t *testing.T) { want, err := os.ReadFile(tt.want) require.NoError(t, err) - // Delete all the `/r` to make the tests OS-agnostic. + // Normalize CRLF to LF to make the tests OS-agnostic. want = []byte(strings.ReplaceAll(string(want), "\r\n", "\n")) assert.Equal(t, string(want), stdout.String())