aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-04-18 18:18:31 +0700
committerShulhan <ms@kilabit.info>2025-04-18 18:18:31 +0700
commit984b3b2c912616de5d8c2de766d4897c255d563e (patch)
treeb7d19f1c118fc6e345869e5bef17455668e3c558
parenta6d11741c4c050cb0cec96f588baff6366da30d2 (diff)
downloadasciidoctor-go-984b3b2c912616de5d8c2de766d4897c255d563e.tar.xz
all: disable generating HTML meta for "generator" in tests
The "generator" value will changes on each releases, so better to disable it to minimize noise during release commit.
-rw-r--r--document_test.go4
-rw-r--r--testdata/document_tohtml_test.txt4
-rw-r--r--testdata/test.adoc1
-rw-r--r--testdata/test.got.html1
4 files changed, 3 insertions, 7 deletions
diff --git a/document_test.go b/document_test.go
index 54c5def..0710499 100644
--- a/document_test.go
+++ b/document_test.go
@@ -22,10 +22,6 @@ func TestOpen(t *testing.T) {
t.Fatal(err)
}
- // Since we cannot overwrite the asciidoctor output for
- // generator, we override ourself.
- doc.Attributes.Entry[DocAttrGenerator] = `Asciidoctor 2.0.18`
-
var buf bytes.Buffer
err = doc.ToHTML(&buf)
diff --git a/testdata/document_tohtml_test.txt b/testdata/document_tohtml_test.txt
index fc29e25..088e50b 100644
--- a/testdata/document_tohtml_test.txt
+++ b/testdata/document_tohtml_test.txt
@@ -7,6 +7,7 @@ v1.0, 15 Dec 2022
:description: Multiline \
description \
with backslash
+:generator!:
:keywords: multiline, \
key, \
words
@@ -22,7 +23,6 @@ Document body.
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="asciidoctor-go 0.7.0">
<meta name="description" content="Multiline description with backslash">
<meta name="keywords" content="multiline, key, words">
<meta name="author" content="John Doe">
@@ -55,6 +55,7 @@ Version 1.0<br>
= Title
John Doe <john@doe.tld>
v1.0, 15 Dec 2022
+:generator!:
:last-update-label!:
:idprefix:
:stylesheet!:
@@ -72,7 +73,6 @@ Section 2 content.
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="asciidoctor-go 0.7.0">
<meta name="author" content="John Doe">
<title>Title</title>
</head>
diff --git a/testdata/test.adoc b/testdata/test.adoc
index a98547e..0f237b3 100644
--- a/testdata/test.adoc
+++ b/testdata/test.adoc
@@ -15,6 +15,7 @@ v1.1.1, 18 July 2020: remark
:test-url: https://kilabit.info
:image-sunset: sunset.jpg
:version-label!:
+:generator!:
:idprefix:
This is preamble.
diff --git a/testdata/test.got.html b/testdata/test.got.html
index 240a961..6db4595 100644
--- a/testdata/test.got.html
+++ b/testdata/test.got.html
@@ -4,7 +4,6 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 2.0.18">
<meta name="description" content="meta description">
<meta name="keywords" content="key, words">
<meta name="author" content="Author A, Author mid dle B">