From 0c5e258f8ab152827728c8dacc1e487bcd8b5408 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 9 Jul 2025 13:30:52 +0200 Subject: [PATCH] e2e/global: TestPromptExitCode: check for trailing newline Make the test slightly more permissive; we're looking for a trailing newline, not necessarily an empty line. Signed-off-by: Sebastiaan van Stijn --- e2e/global/cli_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/global/cli_test.go b/e2e/global/cli_test.go index f79acd1aa76b..6d8f0d2dfed9 100644 --- a/e2e/global/cli_test.go +++ b/e2e/global/cli_test.go @@ -240,7 +240,7 @@ func TestPromptExitCode(t *testing.T) { case <-writeDone: buf.Reset() assert.NilError(t, bufioWriter.Flush()) - assert.Equal(t, buf.String(), "\n", "expected a new line after the process exits from SIGINT") + assert.Assert(t, strings.HasSuffix(buf.String(), "\n"), "expected a new line after the process exits from SIGINT") } }) }