Skip to content

Commit

Permalink
Don't include trailing spaces in pcre2test output (when showing 'star…
Browse files Browse the repository at this point in the history
…ting code units')

Trailing spaces are generally a pain to deal with, since (for example) the
difference between a passing test and failing test can be invisible when
looking at test output in a terminal or text editor.
  • Loading branch information
alexdowad committed Aug 25, 2024
1 parent 5faff98 commit 96ed5fd
Show file tree
Hide file tree
Showing 16 changed files with 831 additions and 831 deletions.
8 changes: 4 additions & 4 deletions src/pcre2test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4839,24 +4839,24 @@ if ((pat_patctl.control & CTL_INFO) != 0)
{
int i;
int c = 24;
fprintf(outfile, "Starting code units: ");
fprintf(outfile, "Starting code units:");
for (i = 0; i < 256; i++)
{
if ((start_bits[i/8] & (1u << (i&7))) != 0)
{
if (c > 75)
{
fprintf(outfile, "\n ");
fprintf(outfile, "\n ");
c = 2;
}
if (PRINTOK(i) && i != ' ')
{
fprintf(outfile, "%c ", i);
fprintf(outfile, " %c", i);
c += 2;
}
else
{
fprintf(outfile, "\\x%02x ", i);
fprintf(outfile, " \\x%02x", i);
c += 5;
}
}
Expand Down
Loading

0 comments on commit 96ed5fd

Please sign in to comment.