diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-04 00:33:08 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-04 00:33:08 +0200 |
commit | 5388211c1158b81725af04152c6e73eddc1435a0 (patch) | |
tree | 93d1ffdb8fd47b617637ae7528d57d47727dc228 /hugolib/shortcode_test.go | |
parent | 6c0f705217b65c7e91fe22c5b8ca0c3f8b1bf33a (diff) |
Add Asciidoc shortcode test
Fixes #2249
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r-- | hugolib/shortcode_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go index a055d0882..79fb0c72e 100644 --- a/hugolib/shortcode_test.go +++ b/hugolib/shortcode_test.go @@ -466,6 +466,10 @@ e`, {"sect/doc6.md", "\n```bash\n{{< b >}}\n{{% c %}}\n```\n", filepath.FromSlash("sect/doc6/index.html"), "<pre><code class=\"language-bash\">b\nc\n</code></pre>\n"}, + // #2249 + {"sect/doc7.ad", `_Shortcodes:_ *b: {{< b >}} c: {{% c %}}*`, + filepath.FromSlash("sect/doc7/index.html"), + "<div class=\"paragraph\">\n<p><em>Shortcodes:</em> <strong>b: b c: c</strong></p>\n</div>\n"}, } sources := make([]source.ByteSource, len(tests)) @@ -494,6 +498,10 @@ e`, createAndRenderPages(t, s) for _, test := range tests { + if strings.HasSuffix(test.contentPath, ".ad") && !helpers.HasAsciidoc() { + fmt.Println("Skip Asciidoc test case as no Asciidoc present.") + continue + } file, err := hugofs.Destination().Open(test.outFile) if err != nil { |