mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
config: Increase test coverage
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
e77b2ad8fd
commit
266d46dccc
@@ -14,6 +14,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -32,3 +33,13 @@ func TestIsValidConfigFileName(t *testing.T) {
|
||||
c.Assert(IsValidConfigFilename(""), qt.Equals, false)
|
||||
c.Assert(IsValidConfigFilename("config.toml.swp"), qt.Equals, false)
|
||||
}
|
||||
|
||||
func TestFromTOMLConfigString(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
|
||||
c.Assert(
|
||||
func() { FromTOMLConfigString("cfg") },
|
||||
qt.PanicMatches,
|
||||
regexp.MustCompile("_stream.toml:.*"),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user