1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-09 07:42:52 +03:00

Sanitize strings in table output (#4466)

This commit is contained in:
Robert Kaussow
2024-11-26 22:15:26 +01:00
committed by GitHub
parent 7109f3c6d1
commit 7cedda7387
2 changed files with 14 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ func TestPipelineOutput(t *testing.T) {
{
name: "table output with default columns",
args: []string{},
expected: "NUMBER STATUS EVENT BRANCH MESSAGE AUTHOR\n1 success push main message John Doe\n",
expected: "NUMBER STATUS EVENT BRANCH MESSAGE AUTHOR\n1 success push main message multiline John Doe\n",
},
{
name: "table output with custom columns",
@@ -33,7 +33,7 @@ func TestPipelineOutput(t *testing.T) {
{
name: "table output with no header",
args: []string{"output", "--output-no-headers"},
expected: "1 success push main message John Doe\n",
expected: "1 success push main message multiline John Doe\n",
},
{
name: "go-template output",
@@ -53,8 +53,8 @@ func TestPipelineOutput(t *testing.T) {
Status: "success",
Event: "push",
Branch: "main",
Message: "message",
Author: "John Doe",
Message: "message\nmultiline",
Author: "John Doe\n",
},
}