tpl: Add hasPrefix to the template funcs' "smoke test"
authordigitalcraftsman <digitalcraftsman@protonmail.com>
Sat, 2 Apr 2016 23:29:13 +0000 (01:29 +0200)
committerdigitalcraftsman <digitalcraftsman@protonmail.com>
Sat, 2 Apr 2016 23:30:14 +0000 (01:30 +0200)
tpl/template_funcs_test.go

index eb5464c0233880d29b91a38d6fadf15f695f45a9..2c88e50ee5ad595e4cac311d0f50f1d67034f4bc 100644 (file)
@@ -89,6 +89,7 @@ slicestr: {{slicestr "BatMan" 0 3}}
 substr: {{substr "BatMan" 0 -3}}
 substr: {{substr "BatMan" 3 3}}
 title: {{title "Bat man"}}
+hasPrefix: {{ hasPrefix "Hugo" "Hu" }}
 trim: {{ trim "++Batman--" "+-" }}
 upper: {{upper "BatMan"}}
 absURL: {{ "mystyle.css" | absURL }}
@@ -135,6 +136,7 @@ slicestr: Bat
 substr: Bat
 substr: Man
 title: Bat Man
+hasPrefix: true
 trim: Batman
 upper: BATMAN
 absURL: http://mysite.com/hugo/mystyle.css