Mercurial > hg > th-libs
diff tests.c @ 643:a2bf1ea05b05
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 24 Jan 2020 12:06:43 +0200 |
parents | 9e1f9e1d1487 |
children | b897995101b7 |
line wrap: on
line diff
--- a/tests.c Fri Jan 24 09:39:09 2020 +0200 +++ b/tests.c Fri Jan 24 12:06:43 2020 +0200 @@ -577,7 +577,6 @@ int res; printf("========================================\n"); - printf("pattern '%s'\n", pattern); if ((res = th_regex_compile(®, pattern)) != THERR_OK) { THERR("Regex compilation failed: %s\n", @@ -590,6 +589,7 @@ th_regex_match_t *matches = NULL; size_t nmatches; + printf("----------------------------------------\n"); if ((res = th_regex_match(reg, def->str, &nmatches, &matches, -1, def->flags)) != THERR_OK) { @@ -598,6 +598,7 @@ goto out; } + printf("\npattern '%s'\n", pattern); printf(" '%s': matched %" PRIu_SIZE_T " time(s), testresult=%s\n", def->str, nmatches, @@ -879,7 +880,7 @@ if (test_set_start("Regular expressions")) { #ifdef TH_EXPERIMENTAL_REGEX_DEBUG - th_dbg_re_flags = TH_DBG_RE_MATCH; + th_dbg_re_flags = th_verbosity > 0 ? TH_DBG_RE_MATCH : 0; #endif #if 0 @@ -890,8 +891,6 @@ printf("result: %s\n", th_error_str(res)); th_regex_free(reg); } - - // { static const test_regex_def tlist[] = {