Skip to content
Myr

[tests] print test # from the start of the tests file to help with skip and take

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Leonid S. Usov · committed by William Langford · parent cf4b48c · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/jq_test.c+3 added-3 removed
73 unmodified lines
74 int must_fail = 0;75 int check_msg = 0;76 jq_state *jq = NULL;7778 int tests_to_skip = skip;78 int tests_to_skip = skip > 0 ? skip : 0;79 int tests_to_take = take;8081 jq = jq_init();82 assert(jq);
39 unmodified lines
122 take = -1;123 break;124 }125126 printf("Testing '%s' at line number %u\n", prog, lineno);126 int pass = 1;127 tests++;128 printf("Test #%d: '%s' at line number %u\n", tests + tests_to_skip, prog, lineno);129 int compiled = jq_compile(jq, prog);130131 if (must_fail) {132 jq_set_error_cb(jq, NULL, NULL);
89 unmodified lines
222 passed+=pass;223 }224 jq_teardown(&jq);225226 int total_skipped = tests_to_skip > 0 ? tests_to_skip : 0;226 int total_skipped = tests_to_skip;227228 if (skip > 0) {229 total_skipped = tests_to_skip - skip;230 }
173 unmodified lines