Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tsjensen committed Sep 28, 2024
1 parent f6c1861 commit df90c7a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/generate.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,12 @@ int generate_box(sentry_t *thebox)
int rc;
int i;

if (is_debug_logging(MAIN)) {
for (i = 0; i < NUM_SHAPES; i++) {
debug_print_shape(opt.design->shape + i);
}
}

rc = horiz_generate(&(thebox[0]), &(thebox[2]));
if (rc) {
goto err;
Expand Down
5 changes: 3 additions & 2 deletions src/shape.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,9 @@ void debug_print_shape(sentry_t *shape)
log_debug(__FILE__, MAIN, "NULL\n");
return;
}
log_debug(__FILE__, MAIN, "Shape %3s (%dx%d): elastic=%s, bl=",
shape_name[shape->name], (int) shape->width, (int) shape->height, shape->elastic ? "true" : "false");
log_debug(__FILE__, MAIN, "Shape %3s (%dx%d): elastic=%s,%s bl=",
shape_name[shape->name], (int) shape->width, (int) shape->height,
shape->elastic ? "true" : "false", shape->elastic ? " " : "");
if (shape->blank_leftward == NULL) {
log_debug_cont(MAIN, "NULL");
}
Expand Down
13 changes: 13 additions & 0 deletions test/193_logging2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:DESC
Test case which checks some logging features.

:ARGS
-d headline -x debug:main,regexp,parser,lexer,DISCOVERY
:INPUT
Hello World!
:OUTPUT-FILTER
:EXPECTED discard-stderr
/*****************************/
/* H e l l o W o r l d ! */
/*****************************/
:EOF
13 changes: 13 additions & 0 deletions test/194_logging_with_parent_configs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:DESC
Test case 130 with logging turned on.

:ARGS
-f 130_data/B.cfg -d designA -p l1 -a vc -x debug:all
:INPUT
foo
:OUTPUT-FILTER
:EXPECTED discard-stderr
AAA
AAA foo
AAA
:EOF

0 comments on commit df90c7a

Please sign in to comment.