]> err.no Git - varnish/commitdiff
Add "test" keyword for printing a test description
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 20:49:27 +0000 (20:49 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 20:49:27 +0000 (20:49 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2694 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/vtc.c

index 276b06d46a9d98ddacb290fd5cb72e6edad75d27..aeb93234750c910cd070ce14e8341b7ad835d541 100644 (file)
@@ -217,6 +217,21 @@ parse_string(char *buf, const struct cmds *cmd, void *priv)
        }
 }
 
+/**********************************************************************
+ * Output test description
+ */
+
+static void
+cmd_test(char **av, void *priv)
+{
+       (void)priv;
+       assert(!strcmp(av[0], "test"));
+
+       printf("#    TEST %s\n", av[1]);
+       AZ(av[2]);
+}
+
+
 /**********************************************************************
  * Execute a file
  */
@@ -236,6 +251,7 @@ static struct cmds cmds[] = {
        { "vcl",        cmd_vcl },
        { "stats",      cmd_stats },
        { "varnish",    cmd_varnish },
+       { "test",       cmd_test },
        { NULL,         NULL }
 };