mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
all: Unify case of config variable names
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
d9f54a13c1
commit
f21e2f25c9
@@ -376,7 +376,7 @@ func TestMenuWithUnicodeURLs(t *testing.T) {
|
||||
func doTestMenuWithUnicodeURLs(t *testing.T, canonifyURLs bool) {
|
||||
testCommonResetState()
|
||||
|
||||
viper.Set("CanonifyURLs", canonifyURLs)
|
||||
viper.Set("canonifyURLs", canonifyURLs)
|
||||
|
||||
s := setupMenuTests(t, menuPageSources)
|
||||
|
||||
@@ -398,12 +398,12 @@ func TestSectionPagesMenu(t *testing.T) {
|
||||
doTestSectionPagesMenu(false, t)
|
||||
}
|
||||
|
||||
func doTestSectionPagesMenu(canonifyUrls bool, t *testing.T) {
|
||||
func doTestSectionPagesMenu(canonifyURLs bool, t *testing.T) {
|
||||
testCommonResetState()
|
||||
|
||||
viper.Set("SectionPagesMenu", "spm")
|
||||
viper.Set("sectionPagesMenu", "spm")
|
||||
|
||||
viper.Set("CanonifyURLs", canonifyUrls)
|
||||
viper.Set("canonifyURLs", canonifyURLs)
|
||||
s := setupMenuTests(t, menuPageSectionsSources)
|
||||
|
||||
assert.Equal(t, 3, len(s.Sections))
|
||||
@@ -459,7 +459,7 @@ func doTestSectionPagesMenu(canonifyUrls bool, t *testing.T) {
|
||||
func TestTaxonomyNodeMenu(t *testing.T) {
|
||||
testCommonResetState()
|
||||
|
||||
viper.Set("CanonifyURLs", true)
|
||||
viper.Set("canonifyURLs", true)
|
||||
s := setupMenuTests(t, menuPageSources)
|
||||
|
||||
for i, this := range []struct {
|
||||
@@ -544,8 +544,8 @@ func TestMenuSortByN(t *testing.T) {
|
||||
func TestHomeNodeMenu(t *testing.T) {
|
||||
testCommonResetState()
|
||||
|
||||
viper.Set("CanonifyURLs", true)
|
||||
viper.Set("UglyURLs", true)
|
||||
viper.Set("canonifyURLs", true)
|
||||
viper.Set("uglyURLs", true)
|
||||
|
||||
s := setupMenuTests(t, menuPageSources)
|
||||
|
||||
@@ -660,11 +660,11 @@ func setupTestMenuState(t *testing.T) {
|
||||
menus, err := tomlToMap(confMenu1)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to Read menus: %v", err)
|
||||
t.Fatalf("Unable to read menus: %v", err)
|
||||
}
|
||||
|
||||
viper.Set("menu", menus["menu"])
|
||||
viper.Set("baseurl", "http://foo.local/Zoo/")
|
||||
viper.Set("baseURL", "http://foo.local/Zoo/")
|
||||
}
|
||||
|
||||
func setupMenuTests(t *testing.T, pageSources []source.ByteSource) *Site {
|
||||
|
Reference in New Issue
Block a user