tpl: Add missing substr test variants
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 7 Feb 2016 14:22:57 +0000 (15:22 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 7 Feb 2016 14:22:57 +0000 (15:22 +0100)
tpl/template_funcs_test.go

index 3dbfe62045d92f187b9a47161cb956f2d46bb8a9..4ad95b6d2bed9850a9483e0f1405a9e3e0aebef5 100644 (file)
@@ -561,6 +561,9 @@ func TestSubstr(t *testing.T) {
                {"abcdef", 2.0, 2, "cd"},
                {"abcdef", 2, 2.0, "cd"},
                {"ĀĀĀ", 1, 2, "ĀĀ"}, // # issue 1333
+               {"abcdef", "doo", nil, false},
+               {"abcdef", "doo", "doo", false},
+               {"abcdef", 1, "doo", false},
        } {
                var result string
                n = i