diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-04 10:49:20 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-04 10:49:20 +0200 |
commit | e6d97c4fcadc1d7c843f102cd6500a3060e2a5c3 (patch) | |
tree | afec652cbc4e8920215b3dc3e374c647bc4d7b73 /hugolib/shortcode_test.go | |
parent | 5388211c1158b81725af04152c6e73eddc1435a0 (diff) |
Add Rst shortcode test
Fixes #2253
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r-- | hugolib/shortcode_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go index 79fb0c72e..3639bb24b 100644 --- a/hugolib/shortcode_test.go +++ b/hugolib/shortcode_test.go @@ -470,6 +470,9 @@ e`, {"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"}, + {"sect/doc8.rst", `**Shortcodes:** *b: {{< b >}} c: {{% c %}}*`, + filepath.FromSlash("sect/doc8/index.html"), + "<div class=\"document\">\n\n\n<p><strong>Shortcodes:</strong> <em>b: b c: c</em></p>\n</div>"}, } sources := make([]source.ByteSource, len(tests)) @@ -501,7 +504,11 @@ e`, if strings.HasSuffix(test.contentPath, ".ad") && !helpers.HasAsciidoc() { fmt.Println("Skip Asciidoc test case as no Asciidoc present.") continue + } else if strings.HasSuffix(test.contentPath, ".rst") && !helpers.HasRst() { + fmt.Println("Skip Rst test case as no rst2html present.") + continue } + file, err := hugofs.Destination().Open(test.outFile) if err != nil { |