From 80d02a14ab97b0b5a4e1117ff467ce3a5ab64102 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Sun, 3 Apr 2016 01:29:13 +0200 Subject: [PATCH] tpl: Add hasPrefix to the template funcs' "smoke test" --- tpl/template_funcs_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go index eb5464c02..2c88e50ee 100644 --- a/tpl/template_funcs_test.go +++ b/tpl/template_funcs_test.go @@ -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