Skip to content

Commit bfc2156

Browse files
committed
* cleanup
1 parent 8d10046 commit bfc2156

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

txtar/archive_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestParse(t *testing.T) {
1818
parsed *Archive
1919
}{
2020
{
21-
name: "basic LF",
21+
name: "basic with line ending LF",
2222
text: `comment1
2323
comment2
2424
-- file1 --
@@ -45,7 +45,7 @@ parsed: &Archive{
4545
},
4646
},
4747
{
48-
name: "basic CRLF",
48+
name: "basic with line ending CRLF",
4949
text: "comment1\r\n" +
5050
"comment2\r\n" +
5151
"-- file1 --\r\n" +
@@ -72,7 +72,7 @@ parsed: &Archive{
7272
},
7373
},
7474
{
75-
name: "mixed",
75+
name: "mixed line endings",
7676
text: "comment1\n" +
7777
"comment2\r\n" +
7878
"-- file1 --\r\n" +
@@ -126,7 +126,7 @@ func TestFormat(t *testing.T) {
126126
wanted string
127127
}{
128128
{
129-
name: "basic LF",
129+
name: "basic with line ending LF",
130130
input: &Archive{
131131
Comment: []byte("comment1\ncomment2\n"),
132132
Files: []File{
@@ -151,7 +151,7 @@ hello world
151151
`,
152152
},
153153
{
154-
name: "basic CRLF",
154+
name: "basic with line ending CRLF",
155155
input: &Archive{
156156
Comment: []byte("comment1\r\ncomment2\r\n"),
157157
Files: []File{
@@ -175,7 +175,7 @@ hello world
175175
"hello world\r\n",
176176
},
177177
{
178-
name: "mixed",
178+
name: "mixed line endings",
179179
input: &Archive{
180180
Comment: []byte("comment1\ncomment2\r\n"),
181181
Files: []File{
@@ -212,7 +212,6 @@ hello world
212212
t.Run(tt.name, func(t *testing.T) {
213213
result := Format(tt.input)
214214
if string(result) != tt.wanted {
215-
fmt.Println(len(string(result)), len(tt.wanted))
216215
t.Errorf("Wrong output. \nGot:\n%s\nWant:\n%s\n", string(result), tt.wanted)
217216
}
218217
})

0 commit comments

Comments
 (0)