From d10d8c23c46ee02fc7a1a199806233c4c146ccf6 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 14 Mar 2018 22:11:13 -0600 Subject: [PATCH] httpserver: Add a couple test cases for the Replacer on {labelN} --- caddyhttp/httpserver/replacer_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/caddyhttp/httpserver/replacer_test.go b/caddyhttp/httpserver/replacer_test.go index d1c522629..54a935d0c 100644 --- a/caddyhttp/httpserver/replacer_test.go +++ b/caddyhttp/httpserver/replacer_test.go @@ -112,7 +112,8 @@ func TestReplace(t *testing.T) { {"Query string is {query}", "Query string is foo=bar"}, {"Query string value for foo is {?foo}", "Query string value for foo is bar"}, {"Missing query string argument is {?missing}", "Missing query string argument is "}, - {"Label1 is {label1} and label2 is {label2} but label 3 is {label3}. {label4}", "Label1 is localhost and label2 is local but label 3 is -. -"}, + {"{label1} {label2} {label3} {label4}", "localhost local - -"}, + {"Label with missing number is {label} or {labelQQ}", "Label with missing number is - or -"}, } for _, c := range testCases {