some tests and major cleanup
This commit is contained in:
parent
8ef2a2547c
commit
16671b3406
30 changed files with 192057 additions and 202431 deletions
29
pkg/render/render_test.go
Normal file
29
pkg/render/render_test.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2018 Marius Schellenberger
|
||||
|
||||
package render
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTitleFunctions(t *testing.T) {
|
||||
section := "section"
|
||||
title := "title"
|
||||
combined := "section/title"
|
||||
t.Run("StoreTitle", func(t *testing.T) {
|
||||
if StoreTitle(section, title) != combined {
|
||||
t.Fail()
|
||||
}
|
||||
})
|
||||
t.Run("UnstoreTitle", func(t *testing.T) {
|
||||
se, ti := UnstoreTitle(combined)
|
||||
if se != section || ti != title {
|
||||
t.Fail()
|
||||
}
|
||||
})
|
||||
t.Run("Title", func(t *testing.T) {
|
||||
if Title("9ßw$%4h4t-8v74 287(G /SV&3[45v}=94#+?)") != "9w4h4t-8v74+287G+SV345v94" {
|
||||
t.Fail()
|
||||
}
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue