summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-04-06 19:32:50 +0700
committerShulhan <ms@kilabit.info>2021-04-06 19:45:04 +0700
commit3a5ca1ea9d097b7c101d76301b6077c20bb8ad44 (patch)
tree5454c1c9d9362284e1481664b93319e4ee862e0a
parent4c1ded163e57698b227cbee36ae7cad105e34af5 (diff)
downloadasciidoctor-go-3a5ca1ea9d097b7c101d76301b6077c20bb8ad44.tar.xz
go.mod: set minimum Go version to 1.16 and update module share to v0.25.1
The latest update on share v0.25.1 remove the last boolean parameter on lib/test.Assert().
-rw-r--r--cell_format_test.go2
-rw-r--r--column_format_test.go4
-rw-r--r--document_parser_test.go17
-rw-r--r--element_attribute_test.go2
-rw-r--r--element_table_test.go6
-rw-r--r--element_test.go8
-rw-r--r--go.mod4
-rw-r--r--go.sum20
-rw-r--r--inline_parser_test.go30
-rw-r--r--parser_paragraph_test.go2
-rw-r--r--parser_test.go2
-rw-r--r--revision_test.go2
-rw-r--r--section_counters_test.go4
-rw-r--r--table_parser_test.go2
-rw-r--r--testdata/got.test.html2
15 files changed, 51 insertions, 56 deletions
diff --git a/cell_format_test.go b/cell_format_test.go
index ed24b9e..f83b050 100644
--- a/cell_format_test.go
+++ b/cell_format_test.go
@@ -82,6 +82,6 @@ func TestParseCellFormat(t *testing.T) {
for _, c := range cases {
got := parseCellFormat(c.raw)
- test.Assert(t, c.raw, c.exp, got, false)
+ test.Assert(t, c.raw, c.exp, got)
}
}
diff --git a/column_format_test.go b/column_format_test.go
index 38ea750..3fb3775 100644
--- a/column_format_test.go
+++ b/column_format_test.go
@@ -43,7 +43,7 @@ func TestParseColumnFormat(t *testing.T) {
for _, c := range cases {
gotNCols, gotFormat := parseColumnFormat(c.s)
- test.Assert(t, c.s+" ncols", c.expNCols, gotNCols, false)
- test.Assert(t, c.s, c.expFormat, gotFormat, false)
+ test.Assert(t, c.s+" ncols", c.expNCols, gotNCols)
+ test.Assert(t, c.s, c.expFormat, gotFormat)
}
}
diff --git a/document_parser_test.go b/document_parser_test.go
index e64edd7..d55b7db 100644
--- a/document_parser_test.go
+++ b/document_parser_test.go
@@ -37,7 +37,7 @@ func TestParse_metaDocTitle(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- test.Assert(t, "", expHTML, buf.String(), true)
+ test.Assert(t, "", expHTML, buf.String())
}
}
@@ -94,7 +94,7 @@ func TestParse_metaShowTitle(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- test.Assert(t, c.desc, c.expHTML, buf.String(), true)
+ test.Assert(t, c.desc, c.expHTML, buf.String())
}
}
@@ -142,11 +142,10 @@ func TestParse_document_title(t *testing.T) {
for _, c := range cases {
got := Parse([]byte(c.content))
- test.Assert(t, "Main", c.exp.Main, got.Title.Main, true)
- test.Assert(t, "Sub", c.exp.Sub, got.Title.Sub, true)
- test.Assert(t, "sep", c.exp.sep, got.Title.sep, true)
-
- test.Assert(t, "String", c.expString, got.Title.String(), true)
+ test.Assert(t, "Main", c.exp.Main, got.Title.Main)
+ test.Assert(t, "Sub", c.exp.Sub, got.Title.Sub)
+ test.Assert(t, "sep", c.exp.sep, got.Title.sep)
+ test.Assert(t, "String", c.expString, got.Title.String())
}
}
@@ -208,7 +207,7 @@ A B <a@b>; C <c@c>; D e_f G <>;`,
for _, c := range cases {
got := Parse([]byte(c.content))
- test.Assert(t, c.desc, c.exp, got.Authors, true)
+ test.Assert(t, c.desc, c.exp, got.Authors)
}
}
@@ -264,5 +263,5 @@ Paragraph C.
t.Fatal(err)
}
- test.Assert(t, "parseListDescription with open block", exp, got.String(), false)
+ test.Assert(t, "parseListDescription with open block", exp, got.String())
}
diff --git a/element_attribute_test.go b/element_attribute_test.go
index fb00d8e..45d69b6 100644
--- a/element_attribute_test.go
+++ b/element_attribute_test.go
@@ -70,6 +70,6 @@ func Test_parseElementAttribute(t *testing.T) {
for _, c := range cases {
got := elementAttribute{}
got.parseElementAttribute([]byte(c.raw))
- test.Assert(t, c.raw, c.exp, got, false)
+ test.Assert(t, c.raw, c.exp, got)
}
}
diff --git a/element_table_test.go b/element_table_test.go
index c214f1b..1f9c6dd 100644
--- a/element_table_test.go
+++ b/element_table_test.go
@@ -162,8 +162,8 @@ func TestParseAttrCols(t *testing.T) {
for _, c := range cases {
ncols, formats := parseAttrCols(c.val)
- test.Assert(t, "ncols", c.ncols, ncols, false)
- test.Assert(t, c.val, c.formats, formats, false)
+ test.Assert(t, "ncols", c.ncols, ncols)
+ test.Assert(t, c.val, c.formats, formats)
}
}
@@ -221,6 +221,6 @@ func TestParseToRawRows(t *testing.T) {
for _, c := range cases {
got := parseToRawRows([]byte(c.raw))
- test.Assert(t, c.desc, c.exp, got, false)
+ test.Assert(t, c.desc, c.exp, got)
}
}
diff --git a/element_test.go b/element_test.go
index 1f64305..a53b6ff 100644
--- a/element_test.go
+++ b/element_test.go
@@ -27,9 +27,9 @@ func TestAdocNode_parseListDescriptionItem(t *testing.T) {
el := &element{}
el.parseListDescriptionItem([]byte(c.line))
- test.Assert(t, "element.Level", c.expLevel, el.level, true)
- test.Assert(t, "element.rawLabel", c.expRawTerm, el.rawLabel.String(), true)
- test.Assert(t, "element.raw", c.expRaw, string(el.raw), true)
+ test.Assert(t, "element.Level", c.expLevel, el.level)
+ test.Assert(t, "element.rawLabel", c.expRawTerm, el.rawLabel.String())
+ test.Assert(t, "element.raw", c.expRaw, string(el.raw))
}
}
@@ -178,6 +178,6 @@ func TestAdocNode_postConsumeTable(t *testing.T) {
raw: []byte(c.raw),
}
got := el.postConsumeTable()
- test.Assert(t, c.desc, c.exp, *got, false)
+ test.Assert(t, c.desc, c.exp, *got)
}
}
diff --git a/go.mod b/go.mod
index 76b739b..a58b376 100644
--- a/go.mod
+++ b/go.mod
@@ -1,7 +1,7 @@
module git.sr.ht/~shulhan/asciidoctor-go
-go 1.15
+go 1.16
-require github.com/shuLhan/share v0.24.0
+require github.com/shuLhan/share v0.25.1
//replace github.com/shuLhan/share => ../share
diff --git a/go.sum b/go.sum
index 048e940..b0a3a0a 100644
--- a/go.sum
+++ b/go.sum
@@ -1,16 +1,12 @@
-github.com/shuLhan/share v0.24.0 h1:zl2HcGcqBMZFHxhmH9IqMYudfhwJzYucthE6Z9aRBqQ=
-github.com/shuLhan/share v0.24.0/go.mod h1:c6xnA1EctNz2KGVlekfydyXoUjpTPjyUHUIyWSELN/c=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+github.com/shuLhan/share v0.25.1 h1:k2btbYnBcsIfkM6BvRrCZ4i726pY5bF8xxGvjlWsxVY=
+github.com/shuLhan/share v0.25.1/go.mod h1:G6T/vwf4RNLP6iJBhOfExDfAnPT8MuSDQ4Y81Ax9fDg=
+golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210108172913-0df2131ae363/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/term v0.0.0-20210317153231-de623e64d2a6/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
diff --git a/inline_parser_test.go b/inline_parser_test.go
index 9ce9426..644dbee 100644
--- a/inline_parser_test.go
+++ b/inline_parser_test.go
@@ -44,7 +44,7 @@ func TestInlineParser_do(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -84,7 +84,7 @@ func TestInlineParser_parseAttrRef(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -129,7 +129,7 @@ func TestInlineParser_parseCrossReference(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -186,7 +186,7 @@ func TestInlineParser_parseFormat(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -231,7 +231,7 @@ func TestInlineParser_parseFormatUnconstrained(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -283,7 +283,7 @@ func TestInlineParser_parseInlineID(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -328,7 +328,7 @@ func TestInlineParser_parseInlineIDShort(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -371,7 +371,7 @@ image:linux.png[2]`,
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -413,7 +413,7 @@ func TestInlineParser_parsePassthrough(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -461,7 +461,7 @@ func TestInlineParser_parsePassthroughDouble(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -515,7 +515,7 @@ func TestInlineParser_parsePassthroughTriple(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -566,7 +566,7 @@ func TestInlineParser_parseQuote(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -608,7 +608,7 @@ func TestInlineParser_parseSubscsript(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -650,7 +650,7 @@ func TestInlineParser_parseSuperscript(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
@@ -707,6 +707,6 @@ func TestInlineParser_parseURL(t *testing.T) {
}
got := buf.String()
- test.Assert(t, c.content, c.exp, got, true)
+ test.Assert(t, c.content, c.exp, got)
}
}
diff --git a/parser_paragraph_test.go b/parser_paragraph_test.go
index 386d6da..017b88d 100644
--- a/parser_paragraph_test.go
+++ b/parser_paragraph_test.go
@@ -32,6 +32,6 @@ This is the ultimate paragraph.`),
if err != nil {
t.Fatal(err)
}
- test.Assert(t, c.desc, c.exp, out.String(), false)
+ test.Assert(t, c.desc, c.exp, out.String())
}
}
diff --git a/parser_test.go b/parser_test.go
index 94c775d..13a5653 100644
--- a/parser_test.go
+++ b/parser_test.go
@@ -23,6 +23,6 @@ func TestIsValidID(t *testing.T) {
for _, c := range cases {
got := isValidID([]byte(c.id))
- test.Assert(t, c.id, c.exp, got, true)
+ test.Assert(t, c.id, c.exp, got)
}
}
diff --git a/revision_test.go b/revision_test.go
index b092e9a..f17ac90 100644
--- a/revision_test.go
+++ b/revision_test.go
@@ -58,6 +58,6 @@ func TestParseRevision(t *testing.T) {
for _, c := range cases {
got := parseRevision(c.raw)
- test.Assert(t, "Revision", c.exp, got, true)
+ test.Assert(t, "Revision", c.exp, got)
}
}
diff --git a/section_counters_test.go b/section_counters_test.go
index 6059452..8374551 100644
--- a/section_counters_test.go
+++ b/section_counters_test.go
@@ -64,7 +64,7 @@ func TestSectionCounters(t *testing.T) {
for _, c := range cases {
got := sec.set(c.level)
gotString := got.String()
- test.Assert(t, "set", c.exp, got, true)
- test.Assert(t, "String", c.expString, gotString, true)
+ test.Assert(t, "set", c.exp, got)
+ test.Assert(t, "String", c.expString, gotString)
}
}
diff --git a/table_parser_test.go b/table_parser_test.go
index 441aa68..cc6e0c8 100644
--- a/table_parser_test.go
+++ b/table_parser_test.go
@@ -84,6 +84,6 @@ func TestTableParser_new(t *testing.T) {
for _, c := range cases {
pt := newTableParser([]byte(c.content))
- test.Assert(t, c.desc, c.exp, pt.cells, false)
+ test.Assert(t, c.desc, c.exp, pt.cells)
}
}
diff --git a/testdata/got.test.html b/testdata/got.test.html
index 4dc6806..a688a13 100644
--- a/testdata/got.test.html
+++ b/testdata/got.test.html
@@ -2959,7 +2959,7 @@ this sidebar.</p>
<div id="footer">
<div id="footer-text">
1.1.1<br>
-Last updated 2020-12-20 01:53:36 +0700
+Last updated 2020-12-20 01:53:35 +0700
</div>
</div>
</body>