diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-14 21:32:32 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-14 21:32:32 +0300 |
commit | 3564f09e3d41ce6d82ea172f31a9cf4926e15720 (patch) | |
tree | 9858e4f176d9ea93f41f9702517ecd182176e474 /tpl | |
parent | 55a4f6e48e381fffe33eba71ff6a08c593b1c2c7 (diff) |
tpl: Add humanize examples to smoke tests
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/template_funcs_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go index e6c3a78f1..eeffd46bd 100644 --- a/tpl/template_funcs_test.go +++ b/tpl/template_funcs_test.go @@ -93,6 +93,10 @@ eq: {{ if eq .Section "blog" }}current{{ end }} findRE: {{ findRE "[G|g]o" "Hugo is a static side generator written in Go." 1 }} hasPrefix 1: {{ hasPrefix "Hugo" "Hu" }} hasPrefix 2: {{ hasPrefix "Hugo" "Fu" }} +humanize 1: {{ humanize "my-first-post" }} +humanize 2: {{ humanize "myCamelPost" }} +humanize 3: {{ humanize "52" }} +humanize 4: {{ humanize 103 }} in: {{ if in "this string contains a substring" "substring" }}Substring found!{{ end }} jsonify: {{ (slice "A" "B" "C") | jsonify }} lower: {{lower "BatMan"}} @@ -145,6 +149,10 @@ eq: current findRE: [go] hasPrefix 1: true hasPrefix 2: false +humanize 1: My first post +humanize 2: My camel post +humanize 3: 52nd +humanize 4: 103rd in: Substring found! jsonify: ["A","B","C"] lower: batman |