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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-09 13:35:17 +02:00
parent 30cad385b6
commit 0c5e258f8a
+1 -1
View File
@@ -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")
}
})
}