From cc58717033a1f7755429031cd6dd4818f5c2d160 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 11 Apr 2023 19:37:24 +0200 Subject: Fix some "make sc_prohibit_leading_TABs" findings. * tests/test-calloc-gnu.c: Expand tabs. * tests/test-regex.c: Likewise. --- tests/test-calloc-gnu.c | 2 +- tests/test-regex.c | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'tests') diff --git a/tests/test-calloc-gnu.c b/tests/test-calloc-gnu.c index bcd47d4f01..fd72c44c60 100644 --- a/tests/test-calloc-gnu.c +++ b/tests/test-calloc-gnu.c @@ -63,7 +63,7 @@ main () ASSERT (p == NULL); ASSERT (errno == ENOMEM); - p = calloc (SIZE_MAX / n + 1, identity (n)); + p = calloc (SIZE_MAX / n + 1, identity (n)); ASSERT (p == NULL); ASSERT (errno == ENOMEM); } diff --git a/tests/test-regex.c b/tests/test-regex.c index aa85e81c56..787ca51472 100644 --- a/tests/test-regex.c +++ b/tests/test-regex.c @@ -134,31 +134,31 @@ bug_regex11 (void) { n = regcomp (&re, tests[i].pattern, tests[i].flags); if (n != 0) - { - char buf[500]; - regerror (n, &re, buf, sizeof (buf)); - report_error ("%s: regcomp %zd failed: %s", tests[i].pattern, i, buf); - continue; - } + { + char buf[500]; + regerror (n, &re, buf, sizeof (buf)); + report_error ("%s: regcomp %zd failed: %s", tests[i].pattern, i, buf); + continue; + } if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0)) - { - report_error ("%s: regexec %zd failed", tests[i].pattern, i); - regfree (&re); - continue; - } + { + report_error ("%s: regexec %zd failed", tests[i].pattern, i); + regfree (&re); + continue; + } for (n = 0; n < tests[i].nmatch; ++n) - if (rm[n].rm_so != tests[i].rm[n].rm_so + if (rm[n].rm_so != tests[i].rm[n].rm_so || rm[n].rm_eo != tests[i].rm[n].rm_eo) - { - if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1) - break; - report_error ("%s: regexec %zd match failure rm[%d] %d..%d", + { + if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1) + break; + report_error ("%s: regexec %zd match failure rm[%d] %d..%d", tests[i].pattern, i, n, (int) rm[n].rm_so, (int) rm[n].rm_eo); - break; - } + break; + } regfree (&re); } -- cgit v1.2.1