]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
var_expand*(): Added small unit tests for %H and %N
authorTimo Sirainen <tss@iki.fi>
Thu, 6 Jun 2013 09:42:34 +0000 (12:42 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 6 Jun 2013 09:42:34 +0000 (12:42 +0300)
src/lib/test-var-expand.c

index 4ff14c82575062d45dbd7620950aa5be01bcd237..a00be13e129411dbedc59b47b644b4b5445f2fed 100644 (file)
@@ -21,9 +21,15 @@ static void test_var_expand_builtin(void)
        static struct var_expand_test tests[] = {
                { "%{hostname}", NULL },
                { "%{pid}", NULL },
-               { "a%{env:FOO}b", "abaRb" }
+               { "a%{env:FOO}b", "abaRb" },
+               { "%50Hv", "1f" },
+               { "%50Hw", "2e" },
+               { "%50Nv", "25" },
+               { "%50Nw", "e" }
        };
        static struct var_expand_table table[] = {
+               { 'v', "value", NULL },
+               { 'w', "value2", NULL },
                { '\0', NULL, NULL }
        };
        string_t *str = t_str_new(128);