diff --git a/pkg/parser/blank_line_test.go b/pkg/parser/blank_line_test.go
index c888a821..b573a32f 100644
--- a/pkg/parser/blank_line_test.go
+++ b/pkg/parser/blank_line_test.go
@@ -31,7 +31,7 @@ second paragraph`
},
},
}
- verifyPreflight(expected, doc)
+ verifyPreflight("test.adoc", expected, doc)
})
It("blank line with spaces and tabs between 2 paragraphs and after second paragraph", func() {
doc := `first paragraph
@@ -63,7 +63,7 @@ second paragraph
},
},
}
- verifyPreflight(expected, doc)
+ verifyPreflight("test.adoc", expected, doc)
})
})
diff --git a/pkg/parser/comment_test.go b/pkg/parser/comment_test.go
index 5f2360db..89bd5ac1 100644
--- a/pkg/parser/comment_test.go
+++ b/pkg/parser/comment_test.go
@@ -150,7 +150,7 @@ a second paragraph`
},
},
}
- verifyPreflight(expected, doc)
+ verifyPreflight("test.adoc", expected, doc)
})
})
diff --git a/pkg/parser/cross_reference_test.go b/pkg/parser/cross_reference_test.go
index debb2e18..e6bf9bc7 100644
--- a/pkg/parser/cross_reference_test.go
+++ b/pkg/parser/cross_reference_test.go
@@ -49,7 +49,7 @@ with some content linked to <>!`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("cross-reference with custom id and label", func() {
@@ -92,7 +92,7 @@ with some content linked to <>!`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
})
diff --git a/pkg/parser/delimited_block_test.go b/pkg/parser/delimited_block_test.go
index 5c7b8475..001e8909 100644
--- a/pkg/parser/delimited_block_test.go
+++ b/pkg/parser/delimited_block_test.go
@@ -124,7 +124,7 @@ var _ = Describe("delimited blocks - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("fenced block after a paragraph", func() {
@@ -158,7 +158,7 @@ var _ = Describe("delimited blocks - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("fenced block with unclosed delimiter", func() {
@@ -424,7 +424,7 @@ then a normal paragraph.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("listing block just after a paragraph", func() {
@@ -460,7 +460,7 @@ some listing code
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("listing block with unclosed delimiter", func() {
@@ -722,7 +722,7 @@ paragraphs
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
diff --git a/pkg/parser/document_preprocessing.go b/pkg/parser/document_preprocessing.go
index 11e4d609..be81dc31 100644
--- a/pkg/parser/document_preprocessing.go
+++ b/pkg/parser/document_preprocessing.go
@@ -52,7 +52,7 @@ func parseElements(filename string, elements []interface{}, attrs types.Document
result = append(result, e)
case types.FileInclusion:
// read the file and include its content
- embedded, err := parseFileToInclude(e, attrs, opts...)
+ embedded, err := parseFileToInclude(filename, e, attrs, opts...)
if err != nil {
// do not fail, but instead report the error in the console
log.Errorf("failed to include file '%s': %v", e.Location, err)
@@ -91,16 +91,24 @@ var invalidFileTmpl *template.Template
func init() {
var err error
- invalidFileTmpl, err = template.New("invalid file to include").Parse(`Unresolved directive in test.adoc - {{ . }}`)
+ invalidFileTmpl, err = template.New("invalid file to include").Parse(`Unresolved directive in {{ .Filename }} - {{ .Error }}`)
if err != nil {
log.Fatalf("failed to initialize template: %v", err)
}
}
-func invalidFileErrMsg(path, rawText string, err error) (types.PreflightDocument, error) {
+type invalidFileData struct {
+ Filename string
+ Error string
+}
+
+func invalidFileErrMsg(filename, path, rawText string, err error) (types.PreflightDocument, error) {
log.WithError(err).Errorf("failed to include '%s'", path)
buf := bytes.NewBuffer(nil)
- err = invalidFileTmpl.Execute(buf, rawText)
+ err = invalidFileTmpl.Execute(buf, invalidFileData{
+ Filename: filename,
+ Error: rawText,
+ })
if err != nil {
return types.PreflightDocument{}, err
}
@@ -120,31 +128,31 @@ func invalidFileErrMsg(path, rawText string, err error) (types.PreflightDocument
}, nil
}
-func parseFileToInclude(incl types.FileInclusion, attrs types.DocumentAttributes, opts ...Option) (types.PreflightDocument, error) {
+func parseFileToInclude(filename string, incl types.FileInclusion, attrs types.DocumentAttributes, opts ...Option) (types.PreflightDocument, error) {
path := incl.Location.Resolve(attrs)
log.Debugf("parsing '%s'...", path)
f, absPath, done, err := open(path)
defer done()
if err != nil {
- return invalidFileErrMsg(path, incl.RawText, err)
+ return invalidFileErrMsg(filename, path, incl.RawText, err)
}
content := bytes.NewBuffer(nil)
scanner := bufio.NewScanner(bufio.NewReader(f))
if lineRanges, ok := incl.LineRanges(); ok {
if err := readWithinLines(scanner, content, lineRanges); err != nil {
- return invalidFileErrMsg(path, incl.RawText, err)
+ return invalidFileErrMsg(filename, path, incl.RawText, err)
}
} else if tagRanges, ok := incl.TagRanges(); ok {
if err := readWithinTags(scanner, content, tagRanges); err != nil {
- return invalidFileErrMsg(path, incl.RawText, err)
+ return invalidFileErrMsg(filename, path, incl.RawText, err)
}
} else {
if err := readAll(scanner, content); err != nil {
- return invalidFileErrMsg(path, incl.RawText, err)
+ return invalidFileErrMsg(filename, path, incl.RawText, err)
}
}
if err := scanner.Err(); err != nil {
- msg, err2 := invalidFileErrMsg(path, incl.RawText, err)
+ msg, err2 := invalidFileErrMsg(filename, path, incl.RawText, err)
if err2 != nil {
return types.PreflightDocument{}, err2
}
diff --git a/pkg/parser/file_inclusion_test.go b/pkg/parser/file_inclusion_test.go
index efd949b1..4f33ed03 100644
--- a/pkg/parser/file_inclusion_test.go
+++ b/pkg/parser/file_inclusion_test.go
@@ -114,7 +114,7 @@ var _ = Describe("file inclusions - preflight with preprocessing", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should include adoc file with leveloffset", func() {
@@ -147,7 +147,7 @@ var _ = Describe("file inclusions - preflight with preprocessing", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
Context("file inclusions in delimited blocks", func() {
@@ -187,7 +187,7 @@ var _ = Describe("file inclusions - preflight with preprocessing", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should include adoc file within listing block", func() {
@@ -225,7 +225,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should include adoc file within example block", func() {
@@ -263,7 +263,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should include adoc file within quote block", func() {
@@ -301,7 +301,7 @@ ____`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should include adoc file within verse block", func() {
@@ -342,7 +342,7 @@ ____`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should include adoc file within sidebar block", func() {
@@ -380,7 +380,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should include adoc file within passthrough block", func() {
@@ -415,7 +415,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -442,7 +442,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with multiple unquoted lines", func() {
@@ -465,7 +465,7 @@ include::../../test/includes/chapter-a.adoc[]
types.BlankLine{},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with multiple unquoted ranges", func() {
@@ -492,7 +492,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with invalid unquoted range - case 1", func() {
@@ -525,7 +525,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with invalid unquoted range - case 2", func() {
@@ -547,7 +547,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -572,7 +572,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with multiple quoted lines", func() {
@@ -595,7 +595,7 @@ include::../../test/includes/chapter-a.adoc[]
types.BlankLine{},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with multiple quoted ranges", func() {
@@ -623,7 +623,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with invalid quoted range - case 1", func() {
@@ -656,7 +656,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with invalid quoted range - case 2", func() {
@@ -689,7 +689,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with ignored tags", func() {
@@ -712,7 +712,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
})
@@ -738,7 +738,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with surrounding tag", func() {
@@ -773,7 +773,7 @@ include::../../test/includes/chapter-a.adoc[]
types.BlankLine{},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with unclosed tag", func() {
@@ -805,7 +805,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with unknown tag", func() {
@@ -815,7 +815,7 @@ include::../../test/includes/chapter-a.adoc[]
Blocks: []interface{}{},
}
// when/then
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("file inclusion with no tag", func() {
@@ -861,7 +861,7 @@ include::../../test/includes/chapter-a.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -872,7 +872,6 @@ include::../../test/includes/chapter-a.adoc[]
// setup logger to write in a buffer so we can check the output
console, reset := configureLogger()
defer reset()
-
source := `include::{unknown}/unknown.adoc[leveloffset=+1]`
expected := types.PreflightDocument{
Blocks: []interface{}{
@@ -881,14 +880,14 @@ include::../../test/includes/chapter-a.adoc[]
Lines: []types.InlineElements{
{
types.StringElement{
- Content: "Unresolved directive in test.adoc - include::{unknown}/unknown.adoc[leveloffset=+1]",
+ Content: "Unresolved directive in foo.adoc - include::{unknown}/unknown.adoc[leveloffset=+1]",
},
},
},
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("foo.adoc", expected, source)
// verify error in logs
verifyConsoleOutput(console, "failed to include '{unknown}/unknown.adoc'")
@@ -907,14 +906,14 @@ include::../../test/includes/chapter-a.adoc[]
Lines: []types.InlineElements{
{
types.StringElement{
- Content: "Unresolved directive in test.adoc - include::../../test/includes/unknown.adoc[leveloffset=+1]",
+ Content: "Unresolved directive in foo.adoc - include::../../test/includes/unknown.adoc[leveloffset=+1]",
},
},
},
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("foo.adoc", expected, source)
// verify error in logs
verifyConsoleOutput(console, "failed to include '../../test/includes/unknown.adoc'")
})
@@ -938,7 +937,7 @@ include::../../test/includes/unknown.adoc[leveloffset=+1]
Lines: []types.InlineElements{
{
types.StringElement{
- Content: "Unresolved directive in test.adoc - include::../../test/includes/unknown.adoc[leveloffset=+1]",
+ Content: "Unresolved directive in foo.adoc - include::../../test/includes/unknown.adoc[leveloffset=+1]",
},
},
},
@@ -947,7 +946,7 @@ include::../../test/includes/unknown.adoc[leveloffset=+1]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("foo.adoc", expected, source)
// verify error in logs
verifyConsoleOutput(console, "failed to include '../../test/includes/unknown.adoc'")
})
@@ -989,7 +988,7 @@ include::{includedir}/grandchild-include.adoc[]`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("should resolve path with attribute in delimited block", func() {
@@ -1034,7 +1033,7 @@ include::{includedir}/grandchild-include.adoc[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -1097,7 +1096,7 @@ include::../../test/includes/hello_world.go.txt[]
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
})
diff --git a/pkg/parser/footnote_test.go b/pkg/parser/footnote_test.go
index e6e3f7c8..f92c1716 100644
--- a/pkg/parser/footnote_test.go
+++ b/pkg/parser/footnote_test.go
@@ -41,7 +41,7 @@ var _ = Describe("footnotes - preflight", func() {
},
},
}
- verifyPreflight(expected, source) // need to get the whole document here
+ verifyPreflight("test.adoc", expected, source) // need to get the whole document here
})
It("footnote with single-line rich content", func() {
@@ -94,7 +94,7 @@ var _ = Describe("footnotes - preflight", func() {
},
},
}
- verifyPreflight(expected, source) // need to get the whole document here
+ verifyPreflight("test.adoc", expected, source) // need to get the whole document here
})
It("footnote in a paragraph", func() {
@@ -121,7 +121,7 @@ var _ = Describe("footnotes - preflight", func() {
},
},
}
- verifyPreflight(expected, source) // need to get the whole document here
+ verifyPreflight("test.adoc", expected, source) // need to get the whole document here
})
})
@@ -168,7 +168,7 @@ var _ = Describe("footnotes - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("footnoteref with unknown reference", func() {
@@ -212,7 +212,7 @@ var _ = Describe("footnotes - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -313,7 +313,7 @@ a paragraph with another footnote:[baz]`
},
},
}
- verifyPreflight(expected, source) // need to get the whole document here
+ verifyPreflight("test.adoc", expected, source) // need to get the whole document here
})
})
diff --git a/pkg/parser/frontmatter_test.go b/pkg/parser/frontmatter_test.go
index 17e1efd3..b6dc839f 100644
--- a/pkg/parser/frontmatter_test.go
+++ b/pkg/parser/frontmatter_test.go
@@ -35,7 +35,7 @@ first paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("empty front-matter", func() {
@@ -59,7 +59,7 @@ first paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
diff --git a/pkg/parser/image_test.go b/pkg/parser/image_test.go
index 9aa4c329..94076f7a 100644
--- a/pkg/parser/image_test.go
+++ b/pkg/parser/image_test.go
@@ -121,7 +121,7 @@ image::appa.png[]`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -162,7 +162,7 @@ image::appa.png[]`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
})
diff --git a/pkg/parser/labeled_list_test.go b/pkg/parser/labeled_list_test.go
index f5bab1d3..02a636d6 100644
--- a/pkg/parser/labeled_list_test.go
+++ b/pkg/parser/labeled_list_test.go
@@ -33,7 +33,7 @@ on 2 lines`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with a single term and no description", func() {
@@ -48,7 +48,7 @@ on 2 lines`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with a horizontal layout attribute", func() {
@@ -75,7 +75,7 @@ Item1:: foo`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with a single term and a blank line", func() {
@@ -91,7 +91,7 @@ Item1:: foo`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with multiple sibling items", func() {
@@ -150,7 +150,7 @@ Item 3 description`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with multiple nested items", func() {
@@ -209,7 +209,7 @@ Item 3 description`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with nested unordered list - case 1", func() {
@@ -275,7 +275,7 @@ Item with description:: something simple`
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with a single item and paragraph", func() {
@@ -315,7 +315,7 @@ a normal paragraph.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with item continuation", func() {
@@ -394,7 +394,7 @@ another fenced block
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list without item continuation", func() {
@@ -463,7 +463,7 @@ another fenced block
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with nested unordered list - case 2", func() {
@@ -495,7 +495,7 @@ another fenced block
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("labeled list with title", func() {
@@ -542,7 +542,7 @@ second term:: definition of the second term`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("max level of labeled items - case 1", func() {
@@ -625,7 +625,7 @@ level 1:: description 1`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("max level of labeled items - case 2", func() {
@@ -708,7 +708,7 @@ level 2::: description 2`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
diff --git a/pkg/parser/literal_block_test.go b/pkg/parser/literal_block_test.go
index 18385844..838c616c 100644
--- a/pkg/parser/literal_block_test.go
+++ b/pkg/parser/literal_block_test.go
@@ -72,7 +72,7 @@ a normal paragraph.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -128,7 +128,7 @@ a normal paragraph.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -161,7 +161,7 @@ a normal paragraph.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("literal block from 2-lines paragraph with attribute", func() {
@@ -198,7 +198,7 @@ a normal paragraph.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
diff --git a/pkg/parser/ordered_list_test.go b/pkg/parser/ordered_list_test.go
index 4209625b..b826ae97 100644
--- a/pkg/parser/ordered_list_test.go
+++ b/pkg/parser/ordered_list_test.go
@@ -33,7 +33,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with arabic numbering style", func() {
@@ -48,7 +48,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with lower alpha numbering style", func() {
@@ -63,7 +63,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with upper alpha numbering style", func() {
@@ -78,7 +78,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with lower roman numbering style", func() {
@@ -93,7 +93,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with upper roman numbering style", func() {
@@ -108,7 +108,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with explicit numbering style", func() {
@@ -133,7 +133,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with explicit start only", func() {
@@ -151,7 +151,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list item with explicit quoted numbering and start", func() {
@@ -170,7 +170,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("max level of ordered items - case 1", func() {
@@ -289,7 +289,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("max level of ordered items - case 2", func() {
@@ -408,7 +408,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -452,7 +452,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list with unnumbered items", func() {
@@ -493,7 +493,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list with custom numbering on child items with tabs ", func() {
@@ -618,7 +618,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list with all default styles and blank lines", func() {
@@ -723,7 +723,7 @@ var _ = Describe("ordered lists - preflight", func() {
types.BlankLine{},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -766,7 +766,7 @@ var _ = Describe("ordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("ordered list with numbered items", func() {
@@ -838,7 +838,7 @@ b. item 2.a`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -928,7 +928,7 @@ another delimited block
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
})
diff --git a/pkg/parser/paragraph_test.go b/pkg/parser/paragraph_test.go
index 30c13c31..e91064a1 100644
--- a/pkg/parser/paragraph_test.go
+++ b/pkg/parser/paragraph_test.go
@@ -328,7 +328,7 @@ And no space after [CAUTION] either.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
diff --git a/pkg/parser/parser_test.go b/pkg/parser/parser_test.go
index bcddbd2c..7386ba7a 100644
--- a/pkg/parser/parser_test.go
+++ b/pkg/parser/parser_test.go
@@ -21,10 +21,10 @@ func verifyDocument(expected interface{}, content string) {
assert.EqualValues(GinkgoT(), expected, preflightDoc)
}
-func verifyPreflight(expected interface{}, content string) {
- log.Debugf("processing: %s", content)
+func verifyPreflight(filename string, expected interface{}, content string) {
+ log.Debugf("processing %s: %s", filename, content)
r := strings.NewReader(content)
- preflightDoc, err := parser.ParsePreflightDocument("", r)
+ preflightDoc, err := parser.ParsePreflightDocument(filename, r)
require.NoError(GinkgoT(), err)
GinkgoT().Logf("actual document: `%s`", spew.Sdump(preflightDoc))
GinkgoT().Logf("expected document: `%s`", spew.Sdump(expected))
diff --git a/pkg/parser/quoted_text_test.go b/pkg/parser/quoted_text_test.go
index 36c8d47e..c8268da3 100644
--- a/pkg/parser/quoted_text_test.go
+++ b/pkg/parser/quoted_text_test.go
@@ -28,7 +28,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("bold text with 2 words", func() {
@@ -50,7 +50,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("bold text with 3 words", func() {
@@ -72,7 +72,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("italic text with 3 words in single quote", func() {
@@ -94,7 +94,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("monospace text with 3 words", func() {
@@ -116,7 +116,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("invalid subscript text with 3 words", func() {
@@ -171,7 +171,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("monospace text within bold text within italic quote", func() {
@@ -205,7 +205,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("italic text within italic text", func() {
@@ -303,7 +303,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("italic text with 3 words in double quote", func() {
@@ -325,7 +325,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("monospace text with 3 words in double quote", func() {
@@ -347,7 +347,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("superscript text within italic text", func() {
@@ -376,7 +376,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("superscript text within italic text within bold quote", func() {
@@ -410,7 +410,7 @@ var _ = Describe("quoted texts - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
diff --git a/pkg/parser/section_test.go b/pkg/parser/section_test.go
index cbb76865..74967727 100644
--- a/pkg/parser/section_test.go
+++ b/pkg/parser/section_test.go
@@ -27,7 +27,7 @@ var _ = Describe("sections - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("header with many spaces around content", func() {
@@ -48,7 +48,7 @@ var _ = Describe("sections - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("header and paragraph", func() {
@@ -81,7 +81,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("two sections with level 0", func() {
@@ -118,7 +118,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section level 1 alone", func() {
@@ -139,7 +139,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section level 1 with quoted text", func() {
@@ -165,7 +165,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section level 0 with nested section level 1", func() {
@@ -201,7 +201,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section level 0 with nested section level 2", func() {
@@ -237,7 +237,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section level 1 with immediate paragraph", func() {
@@ -267,7 +267,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section level 1 with a paragraph separated by empty line", func() {
@@ -299,7 +299,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section level 1 with a paragraph separated by non-empty line", func() {
@@ -329,7 +329,7 @@ and a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("section levels 1, 2, 3, 2", func() {
@@ -418,7 +418,7 @@ a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("single section with custom IDs", func() {
@@ -440,7 +440,7 @@ a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("multiple sections with custom IDs", func() {
@@ -502,7 +502,7 @@ a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("sections with same title", func() {
@@ -538,7 +538,7 @@ a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -556,7 +556,7 @@ a paragraph`
},
},
}}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("header invalid - header space", func() {
@@ -574,7 +574,7 @@ a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("header with invalid section1", func() {
@@ -607,7 +607,7 @@ a paragraph`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -642,7 +642,7 @@ Doc Writer `
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
})
diff --git a/pkg/parser/unordered_list_test.go b/pkg/parser/unordered_list_test.go
index 9b8ecb32..cdae39a8 100644
--- a/pkg/parser/unordered_list_test.go
+++ b/pkg/parser/unordered_list_test.go
@@ -31,7 +31,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with ID, title, role and a single item", func() {
@@ -64,7 +64,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with a title and a single item", func() {
source := `.a title
@@ -91,7 +91,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with 2 items with stars", func() {
@@ -139,7 +139,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list based on article.adoc (with heading spaces)", func() {
@@ -286,7 +286,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with 2 items with carets", func() {
@@ -334,7 +334,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with items with mixed styles", func() {
@@ -427,7 +427,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with 2 items with empty line in-between", func() {
@@ -478,7 +478,7 @@ var _ = Describe("unordered lists - preflight", func() {
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with 2 items on multiple lines", func() {
source := `* item 1
@@ -527,7 +527,7 @@ on 2 lines, too.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered lists with 2 empty lines in-between", func() {
source := `* an item in the first list
@@ -572,7 +572,7 @@ on 2 lines, too.`
},
},
}
- verifyPreflight(expected, source) // parse the whole document to get 2 lists
+ verifyPreflight("test.adoc", expected, source) // parse the whole document to get 2 lists
})
It("unordered list with items on 3 levels", func() {
@@ -716,7 +716,7 @@ on 2 lines, too.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("max level of unordered items - case 1", func() {
@@ -841,7 +841,7 @@ on 2 lines, too.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("max level of unordered items - case 2", func() {
@@ -965,7 +965,7 @@ on 2 lines, too.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -1060,7 +1060,7 @@ on 2 lines, too.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("invalid list item", func() {
@@ -1077,7 +1077,7 @@ on 2 lines, too.`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -1169,7 +1169,7 @@ another delimited block
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list with item continuation - case 2", func() {
@@ -1325,7 +1325,7 @@ The {plus} symbol is on a new line.
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("unordered list without item continuation", func() {
@@ -1405,7 +1405,7 @@ another delimited block
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
@@ -1482,7 +1482,7 @@ paragraph attached to grand parent list item`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
It("attach to parent item", func() {
@@ -1555,7 +1555,7 @@ paragraph attached to parent list item`
},
},
}
- verifyPreflight(expected, source)
+ verifyPreflight("test.adoc", expected, source)
})
})
})
diff --git a/pkg/renderer/html5/blank_line_test.go b/pkg/renderer/html5/blank_line_test.go
index f81ec574..0736ea0e 100644
--- a/pkg/renderer/html5/blank_line_test.go
+++ b/pkg/renderer/html5/blank_line_test.go
@@ -5,7 +5,7 @@ import . "github.com/onsi/ginkgo"
var _ = Describe("blank lines", func() {
It("blank line between 2 paragraphs", func() {
- source := `first paragraph
+ source := `first paragraph
second paragraph`
expected := `
@@ -14,7 +14,7 @@ second paragraph`
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("blank line with spaces and tabs between 2 paragraphs", func() {
@@ -27,7 +27,7 @@ second paragraph`
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("blank lines (tabs) at end of document", func() {
@@ -38,7 +38,7 @@ second paragraph`
expected := `
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("blank lines (spaces) at end of document", func() {
@@ -49,6 +49,6 @@ second paragraph`
expected := `
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
diff --git a/pkg/renderer/html5/comment_test.go b/pkg/renderer/html5/comment_test.go
index 24614ff8..9422d683 100644
--- a/pkg/renderer/html5/comment_test.go
+++ b/pkg/renderer/html5/comment_test.go
@@ -11,7 +11,7 @@ var _ = Describe("comments", func() {
It("single line comment alone", func() {
doc := `// A single-line comment.`
expected := ""
- verify(expected, doc)
+ verify("test.adoc", expected, doc)
})
It("single line comment at end of line", func() {
@@ -19,7 +19,7 @@ var _ = Describe("comments", func() {
expected := `
foo // A single-line comment.
`
- verify(expected, doc)
+ verify("test.adoc", expected, doc)
})
It("single line comment within a paragraph", func() {
@@ -30,7 +30,7 @@ another line`
a first line
another line
`
- verify(expected, doc)
+ verify("test.adoc", expected, doc)
})
})
@@ -42,7 +42,7 @@ a *comment* block
with multiple lines
////`
expected := ""
- verify(expected, doc)
+ verify("test.adoc", expected, doc)
})
It("comment block with paragraphs around", func() {
@@ -58,7 +58,7 @@ a second paragraph`
`
- verify(expected, doc)
+ verify("test.adoc", expected, doc)
})
})
diff --git a/pkg/renderer/html5/cross_reference_test.go b/pkg/renderer/html5/cross_reference_test.go
index 81d0d7d1..41fc8a2b 100644
--- a/pkg/renderer/html5/cross_reference_test.go
+++ b/pkg/renderer/html5/cross_reference_test.go
@@ -20,7 +20,7 @@ with some content linked to <>!`
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("cross-reference with custom id and label", func() {
@@ -36,7 +36,7 @@ with some content linked to <>!`
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("invalid section reference", func() {
@@ -53,7 +53,7 @@ with some content linked to <>!`
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
})
diff --git a/pkg/renderer/html5/delimited_block_test.go b/pkg/renderer/html5/delimited_block_test.go
index 44e18801..d8ec7db0 100644
--- a/pkg/renderer/html5/delimited_block_test.go
+++ b/pkg/renderer/html5/delimited_block_test.go
@@ -17,7 +17,7 @@ var _ = Describe("delimited blocks", func() {
here
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("fenced block with id and title", func() {
@@ -30,7 +30,7 @@ here
here
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("fenced block with external link inside", func() {
@@ -46,7 +46,7 @@ and more text on the
next lines
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -65,7 +65,7 @@ here
here
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("listing block with ID and title", func() {
@@ -80,7 +80,7 @@ some source code
some source code
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -105,7 +105,7 @@ get '/hi' do
end
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("with title, source and languages attributes", func() {
@@ -128,7 +128,7 @@ get '/hi' do
end
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("with id, title, source and languages attributes", func() {
@@ -152,7 +152,7 @@ get '/hi' do
end
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("with html content", func() {
@@ -164,7 +164,7 @@ end
<a>link</a>
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("with other content", func() {
@@ -176,7 +176,7 @@ end
a<<b
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -204,7 +204,7 @@ with bold content
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("example block with multiple elements - case 2", func() {
@@ -223,7 +223,7 @@ and more content
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("example block with multiple elements - case 3", func() {
@@ -242,7 +242,7 @@ and "more" content
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("example block with ID and title", func() {
@@ -259,7 +259,7 @@ foo
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -295,7 +295,7 @@ with bold content
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("admonition block with ID and title", func() {
@@ -331,7 +331,7 @@ with bold content
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("admonition block with ID, title and icon", func() {
source := `:icons: font
@@ -368,7 +368,7 @@ with bold content
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("admonition paragraph and admonition block with multiple elements", func() {
@@ -413,7 +413,7 @@ this is an admonition paragraph.
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("admonition paragraph with an icon", func() {
@@ -434,7 +434,7 @@ an admonition text on
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("admonition paragraph with ID, title and icon", func() {
@@ -456,7 +456,7 @@ an admonition text on 1 line.
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -478,7 +478,7 @@ ____`
quote title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("single-line quote with author and title, and ID and title ", func() {
@@ -500,7 +500,7 @@ ____`
quote title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("multi-line quote with author and title", func() {
@@ -531,7 +531,7 @@ ____`
quote title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("multi-line quote with author only and nested listing", func() {
@@ -569,7 +569,7 @@ ____`
— john doe
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("single-line quote with title only", func() {
@@ -587,7 +587,7 @@ ____`
— quote title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("multi-line quote without author and title", func() {
@@ -607,7 +607,7 @@ are preserved, but not trailing spaces
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("empty quote without author and title", func() {
@@ -620,7 +620,7 @@ ____`
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -639,7 +639,7 @@ ____`
verse title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("single-line verse with author, id and title ", func() {
@@ -657,7 +657,7 @@ ____`
verse title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("multi-line verse with author and title", func() {
@@ -680,7 +680,7 @@ and more!
verse title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("single-line verse with author only", func() {
@@ -694,7 +694,7 @@ ____`
— john doe
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("single-line verse with title only", func() {
@@ -708,7 +708,7 @@ ____`
— verse title
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("multi-line verse without author and title", func() {
@@ -724,7 +724,7 @@ ____`
and tabs
are preserved
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("empty verse without author and title", func() {
@@ -734,7 +734,7 @@ ____`
expected := ``
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -752,7 +752,7 @@ some *verse* content
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("sidebar block with id, title, paragraph and sourcecode block", func() {
@@ -779,7 +779,7 @@ bar
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
})
diff --git a/pkg/renderer/html5/distinct_lists_test.go b/pkg/renderer/html5/distinct_lists_test.go
index 15d25114..8faa370f 100644
--- a/pkg/renderer/html5/distinct_lists_test.go
+++ b/pkg/renderer/html5/distinct_lists_test.go
@@ -30,7 +30,7 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("same list with attribute on middle item", func() {
@@ -56,7 +56,7 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("distinct lists separated by blankline and item attribute - case 1", func() {
@@ -87,7 +87,7 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("distinct lists separated by blankline and item attribute - case 2", func() {
@@ -121,7 +121,7 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -139,7 +139,7 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("same list with multiple comment lines inside", func() {
@@ -158,7 +158,7 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("distinct lists separated by single comment line", func() {
@@ -180,7 +180,7 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("distinct lists separated by multiple comment lines", func() {
@@ -204,6 +204,6 @@ var _ = Describe("lists of items", func() {
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
diff --git a/pkg/renderer/html5/document_attribute_substitution_test.go b/pkg/renderer/html5/document_attribute_substitution_test.go
index af56e0ce..068724a3 100644
--- a/pkg/renderer/html5/document_attribute_substitution_test.go
+++ b/pkg/renderer/html5/document_attribute_substitution_test.go
@@ -19,7 +19,7 @@ a paragraph`
expected := ``
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("a paragraph then some attributes", func() {
@@ -31,7 +31,7 @@ a paragraph`
expected := ``
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("a paragraph with substitution", func() {
@@ -41,7 +41,7 @@ a paragraph written by {author}`
expected := `
a paragraph written by Xavier
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("paragraphs with definitions, substitutions and resets", func() {
@@ -67,7 +67,7 @@ author is now {author}.`
`
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
It("front-matter then paragraph with substitutions", func() {
@@ -79,7 +79,7 @@ author is {author}.`
expected := ``
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -91,7 +91,7 @@ author is {author}.`
expected := ``
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
@@ -103,7 +103,7 @@ author is {author}.`
expected := fmt.Sprintf(``, rendered)
- verify(expected, source)
+ verify("test.adoc", expected, source)
},
Entry("sp symbol", "sp", " "),
Entry("blank symbol", "blank", ""),
@@ -143,7 +143,7 @@ a {blank} here.`
expected := ``
- verify(expected, source)
+ verify("test.adoc", expected, source)
})
})
diff --git a/pkg/renderer/html5/document_details_test.go b/pkg/renderer/html5/document_details_test.go
index ea415d41..4e46e964 100644
--- a/pkg/renderer/html5/document_details_test.go
+++ b/pkg/renderer/html5/document_details_test.go
@@ -48,7 +48,7 @@ Last updated {{.LastUpdated}}