summaryrefslogtreecommitdiff
path: root/dbug/tests.c
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2008-02-03 20:58:47 +0100
committerunknown <serg@janus.mylan>2008-02-03 20:58:47 +0100
commitfe7287f8f769df22bca66c99c9aeb17b82ab2df8 (patch)
tree6c8a2d2245b0d6ce45716db6816284d02320fd82 /dbug/tests.c
parent06477018e77c44b48120cd254bc198baed2d6df7 (diff)
downloadmariadb-git-fe7287f8f769df22bca66c99c9aeb17b82ab2df8.tar.gz
dbug: function/ (a.k.a. SUBDIR) syntax
dbug/dbug.c: function/ (a.k.a. SUBDIR) syntax dbug/tests-t.pl: 1. add support for test comments 2. add test comments 3. move tests around 4. add SUBDIR tests dbug/tests.c: support code for SUBDIR testing include/my_dbug.h: comments. change in _db_set_ prototype dbug/user.r: negative lists and function/ syntax.
Diffstat (limited to 'dbug/tests.c')
-rw-r--r--dbug/tests.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/dbug/tests.c b/dbug/tests.c
index 42482635eee..edb999c0c60 100644
--- a/dbug/tests.c
+++ b/dbug/tests.c
@@ -6,6 +6,8 @@
#undef DBUG_OFF
#endif
+char *push1=0;
+
#include <my_global.h> /* This includes dbug.h */
#include <my_pthread.h>
#include <string.h>
@@ -29,6 +31,11 @@ int func1()
{
DBUG_ENTER("func1");
func2();
+ if (push1)
+ {
+ DBUG_PUSH(push1);
+ fprintf(DBUG_FILE, "=> push1\n");
+ }
DBUG_RETURN(10);
}
@@ -43,12 +50,16 @@ int main (int argc, char *argv[])
#endif
dup2(1, 2);
for (i = 1; i < argc; i++)
- DBUG_PUSH (argv[i]);
+ {
+ if (strncmp(argv[i], "--push1=", 8) == 0)
+ push1=argv[i]+8;
+ else
+ DBUG_PUSH (argv[i]);
+ }
{
DBUG_ENTER ("main");
DBUG_PROCESS ("dbug-tests");
func1();
- func2();
DBUG_EXECUTE_IF("dump",
{
char s[1000];
@@ -68,6 +79,7 @@ int main (int argc, char *argv[])
DBUG_EXPLAIN(s, sizeof(s)-1);
DBUG_PRINT("explain", ("dbug explained: %s", s));
}
+ func2();
DBUG_RETURN (0);
}
}