@@ -87,13 +87,13 @@ func TestPrintEntryRedactable(t *testing.T) {
8787 // characters; they get enclosed in redaction markers in the final output.
8888 {formatEntry {}, "" },
8989 {formatEntry {head : b ("abc" )}, " " + q ("abc" )},
90- {formatEntry {head : b ("abc\n xyz" )}, " " + q ("abc\n xyz " )},
90+ {formatEntry {head : b ("abc\n xyz" )}, " " + q ("abc" ) + " \n " + q ( "xyz " )},
9191 {formatEntry {details : b ("def" )}, " " + q ("def" )},
92- {formatEntry {details : b ("def\n xyz" )}, " " + q ("def\n xyz " )},
92+ {formatEntry {details : b ("def\n xyz" )}, " " + q ("def" ) + " \n " + q ( "xyz " )},
9393 {formatEntry {head : b ("abc" ), details : b ("def" )}, " " + q ("abc" ) + q ("def" )},
94- {formatEntry {head : b ("abc\n xyz" ), details : b ("def" )}, " " + q ("abc\n xyz " ) + q ("def" )},
95- {formatEntry {head : b ("abc" ), details : b ("def\n | xyz" )}, " " + q ("abc" ) + q ("def\n | xyz" )},
96- {formatEntry {head : b ("abc\n xyz" ), details : b ("def\n | xyz" )}, " " + q ("abc\n xyz" ) + q ("def\n | xyz" )},
94+ {formatEntry {head : b ("abc\n xyz" ), details : b ("def" )}, " " + q ("abc" ) + " \n " + q ( "xyz " ) + q ("def" )},
95+ {formatEntry {head : b ("abc" ), details : b ("def\n | xyz" )}, " " + q ("abc" ) + q ("def" ) + " \n " + q ( " | xyz" )},
96+ {formatEntry {head : b ("abc\n xyz" ), details : b ("def\n | xyz" )}, " " + q ("abc" ) + " \n " + q ( "xyz" ) + q ("def" ) + " \n " + q ( " | xyz" )},
9797 // If there were markers in the entry, they get escaped in the output.
9898 {formatEntry {head : b ("abc" + em + sm ), details : b ("def" + em + sm )}, " " + q ("abc" + esc + esc ) + q ("def" + esc + esc )},
9999
@@ -141,7 +141,7 @@ func TestFormatSingleLineOutputRedactable(t *testing.T) {
141141 {[]formatEntry {{head : b (`a` )}, {}}, q (`a` )},
142142 {[]formatEntry {{head : b (`a` )}, {}, {head : b (`c` )}}, q (`c` ) + ": " + q (`a` )},
143143 {[]formatEntry {{head : b (`a` ), elideShort : true }, {head : b (`b` )}}, q (`b` )},
144- {[]formatEntry {{head : b ("abc\n def" )}, {head : b ("ghi\n klm" )}}, q ("ghi\n klm" ) + ": " + q ("abc\n def " )},
144+ {[]formatEntry {{head : b ("abc\n def" )}, {head : b ("ghi\n klm" )}}, q ("ghi" ) + " \n " + q ( "klm" ) + ": " + q ("abc" ) + " \n " + q ( "def " )},
145145
146146 // If some entries are redactable but not others, then
147147 // only those that are redactable are passed through.
@@ -157,8 +157,8 @@ func TestFormatSingleLineOutputRedactable(t *testing.T) {
157157 {[]formatEntry {{head : b (`a` )}, {}, {head : b (`c` )}}, q (`c` ) + `: ` + q (`a` )},
158158 {[]formatEntry {{head : b (`a` )}, {redactable : true }, {head : b (`c` )}}, q (`c` ) + `: ` + q (`a` )},
159159 {[]formatEntry {{head : b (`a` ), elideShort : true , redactable : true }, {head : b (`b` )}}, q (`b` )},
160- {[]formatEntry {{redactable : true , head : b ("abc\n def" )}, {head : b ("ghi\n klm" )}}, q ("ghi\n klm " ) + ": abc\n def" },
161- {[]formatEntry {{head : b ("abc\n def" )}, {redactable : true , head : b ("ghi\n klm" )}}, "ghi\n klm: " + q ("abc\n def " )},
160+ {[]formatEntry {{redactable : true , head : b ("abc\n def" )}, {head : b ("ghi\n klm" )}}, q ("ghi" ) + " \n " + q ( "klm " ) + ": abc\n def" },
161+ {[]formatEntry {{head : b ("abc\n def" )}, {redactable : true , head : b ("ghi\n klm" )}}, "ghi\n klm: " + q ("abc" ) + " \n " + q ( "def " )},
162162 // Entry already contains some markers.
163163 {[]formatEntry {{redactable : true , head : b (`a` + q (" b" ))}, {redactable : true , head : b (`c ` + q ("d" ))}}, `c ` + q (`d` ) + `: a` + q (` b` )},
164164 }
0 commit comments