summaryrefslogtreecommitdiffstats
path: root/src/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test.c')
-rw-r--r--src/test.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test.c b/src/test.c
index c1b0a7f..25a0866 100644
--- a/src/test.c
+++ b/src/test.c
@@ -10,10 +10,10 @@ do { \
printf("FAILED test " # test "\n"); \
goto out; \
} \
- printf("\n"); \
} while(0)
int tsnif_debug = 0;
+int assert_debug = 0;
static void usage()
{
@@ -23,6 +23,8 @@ static void usage()
static int get_args(int argc, char **argv)
{
+ int debug = 0;
+
while (1) {
int c;
int option_index = 0;
@@ -39,7 +41,7 @@ static int get_args(int argc, char **argv)
switch (c) {
case 'd':
- tsnif_debug = 1;
+ debug++;
break;
default:
@@ -47,6 +49,12 @@ static int get_args(int argc, char **argv)
} /* switch(c) */
} /* while(1) */
+ if (debug > 1)
+ tsnif_debug = 1;
+
+ if (debug > 0)
+ assert_debug = 1;
+
return 0;
}