Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions txtar/archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ some content
Files: []File{{"file", []byte("data\r\n")}},
},
},
{
name: "utf8 and comment",
text: `# This is a test comment
-- hello.txt --
Hello
-- unicode.txt --
Go语言
`,
parsed: &Archive{
Comment: []byte("# This is a test comment\n"),
Files: []File{
{"hello.txt", []byte("Hello\n")},
{"unicode.txt", []byte("Go语言\n")},
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down