From f0dbf2c88f456d64f89da146bc5bfeaa1b37ba47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 3 Apr 2016 01:59:47 +0200 Subject: [PATCH] tpl: Add the other test case for hasPrefix --- tpl/template_funcs_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go index 4d9959cab..c16dfb804 100644 --- a/tpl/template_funcs_test.go +++ b/tpl/template_funcs_test.go @@ -89,7 +89,8 @@ delimit: {{ delimit (slice "A" "B" "C") ", " " and " }} 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 @@ delimit: A, B and C div: 2 emojify: I ❤️ Hugo eq: current -hasPrefix: true +hasPrefix 1: true +hasPrefix 2: false in: Substring found! jsonify: ["A","B","C"] lower: batman