aboutsummaryrefslogtreecommitdiff
path: root/table_parser_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-08-05 23:33:05 +0700
committerShulhan <ms@kilabit.info>2022-08-05 23:33:05 +0700
commit502ccd5e3f41f4fd1b3bfa1fad2c41785db1a7d1 (patch)
treeb90fbdc3b17a6e0a6c750b30c254a409856674b2 /table_parser_test.go
parent6df915293cd00fe6e8c8771399745a4532774710 (diff)
downloadasciidoctor-go-502ccd5e3f41f4fd1b3bfa1fad2c41785db1a7d1.tar.xz
all: cleaning up codes
Use raw string literal whenever possible.
Diffstat (limited to 'table_parser_test.go')
-rw-r--r--table_parser_test.go34
1 files changed, 17 insertions, 17 deletions
diff --git a/table_parser_test.go b/table_parser_test.go
index dd71f2e..0c37654 100644
--- a/table_parser_test.go
+++ b/table_parser_test.go
@@ -17,51 +17,51 @@ func TestTableParser_new(t *testing.T) {
}
var cases = []testCase{{
- desc: "empty content",
+ desc: `empty content`,
content: ``,
exp: nil,
}, {
- desc: "first cell without |",
- content: "A1|B1",
+ desc: `first cell without |`,
+ content: `A1|B1`,
exp: []*tableCell{{
- content: []byte("A1"),
+ content: []byte(`A1`),
}, {
- content: []byte("B1"),
+ content: []byte(`B1`),
}},
}, {
- desc: "first cell without |",
+ desc: `first cell without |`,
content: "A1\nb|B1",
exp: []*tableCell{{
content: []byte("A1\nb"),
}, {
- content: []byte("B1"),
+ content: []byte(`B1`),
}},
}, {
- desc: "single row",
+ desc: `single row`,
content: `|A1|B1`,
exp: []*tableCell{{
- content: []byte("A1"),
+ content: []byte(`A1`),
}, {
- content: []byte("B1"),
+ content: []byte(`B1`),
}},
}, {
- desc: "two rows, empty header",
+ desc: `two rows, empty header`,
content: "\n|A1",
exp: []*tableCell{nil, {
- content: []byte("A1"),
+ content: []byte(`A1`),
}},
}, {
- desc: "three rows, empty header",
+ desc: `three rows, empty header`,
content: "\n|A1 |\n\nb\n\n|A2",
exp: []*tableCell{nil, {
- content: []byte("A1 "),
+ content: []byte(`A1 `),
}, {
content: []byte("\n\nb"),
}, nil, {
- content: []byte("A2"),
+ content: []byte(`A2`),
}},
}, {
- desc: "with cell formatting",
+ desc: `with cell formatting`,
content: "3*|DUP\n^|A2\n3*x|B2\n>|C2",
exp: []*tableCell{{
content: []byte("DUP\n"),
@@ -76,7 +76,7 @@ func TestTableParser_new(t *testing.T) {
}, {
content: []byte("B2\n"),
}, {
- content: []byte("C2"),
+ content: []byte(`C2`),
format: cellFormat{
alignHor: colAlignBottom,
},