Skip to content

Commit

Permalink
hugolib: Make an RST test optional
Browse files Browse the repository at this point in the history
If no RST installed.
  • Loading branch information
bep committed Jan 1, 2022
1 parent 0671ef5 commit d632dd7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hugolib/page_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/gohugoio/hugo/htesting"

"github.com/gohugoio/hugo/markup/asciidocext"
"github.com/gohugoio/hugo/markup/rst"

"github.com/gohugoio/hugo/config"

Expand Down Expand Up @@ -376,7 +377,7 @@ func testAllMarkdownEnginesForPages(t *testing.T,
{"md", func() bool { return true }},
{"mmark", func() bool { return true }},
{"ad", func() bool { return asciidocext.Supports() }},
{"rst", func() bool { return true }},
{"rst", func() bool { return rst.Supports() }},
}

for _, e := range engines {
Expand All @@ -385,7 +386,6 @@ func testAllMarkdownEnginesForPages(t *testing.T,
}

t.Run(e.ext, func(t *testing.T) {

cfg, fs := newTestCfg(func(cfg config.Provider) error {
for k, v := range settings {
cfg.Set(k, v)
Expand Down Expand Up @@ -433,7 +433,6 @@ func testAllMarkdownEnginesForPages(t *testing.T,
b.Assert(home, qt.Not(qt.IsNil))
b.Assert(home.File().Path(), qt.Equals, homePath)
b.Assert(content(home), qt.Contains, "Home Page Content")

})

}
Expand Down

0 comments on commit d632dd7

Please sign in to comment.