shithub: hugo

Download patch

ref: f0dbf2c88f456d64f89da146bc5bfeaa1b37ba47
parent: aaee0385815d8b9f691c9a0b3bce6dce69ba2ffb
author: Bjørn Erik Pedersen <[email protected]>
date: Sat Apr 2 21:59:47 EDT 2016

tpl: Add the other test case for hasPrefix

--- a/tpl/template_funcs_test.go
+++ b/tpl/template_funcs_test.go
@@ -89,7 +89,8 @@
 div: {{div 6 3}}
 emojify: {{ "I :heart: Hugo" | emojify }}
 eq: {{ if eq .Section "blog" }}current{{ end }}
-hasPrefix: {{ hasPrefix "Hugo" "Hu" }}
+hasPrefix 1: {{ hasPrefix "Hugo" "Hu" }}
+hasPrefix 2: {{ hasPrefix "Hugo" "Fu" }}
 in: {{ if in "this string contains a substring" "substring" }}Substring found!{{ end }}
 jsonify: {{ (slice "A" "B" "C") | jsonify }}
 lower: {{lower "BatMan"}}
@@ -137,7 +138,8 @@
 div: 2
 emojify: I ❤️  Hugo
 eq: current
-hasPrefix: true
+hasPrefix 1: true
+hasPrefix 2: false
 in: Substring found!
 jsonify: ["A","B","C"]
 lower: batman