tests: Normalize trailing white space in test output completely

Commit 37ff377 stripped trailing white space in test output, except
for journal.log, where it stripped it only from player output.  This
misses the space preceeding player empty output, and doesn't cover
equally annoying trailing white space elsewhere, such as the space
preceeding empty input and trailing white space in prompts.  Testing
the latter could be marginally useful, but let's keep things simple,
and strip all trailing white space for now.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-01-07 20:07:38 +01:00
parent 4dd38ddfe5
commit 3697a0a20b
4 changed files with 468 additions and 467 deletions

View file

@ -37,6 +37,11 @@ while (<>) {
$_ = substr($_, 25); $_ = substr($_, 25);
} }
# Strip trailing white space
# We don't really care for it in test output, and git's pre-commit
# hook flags it, which is annoying.
s/\s+$//;
# Split off prefix that is not to be normalized # Split off prefix that is not to be normalized
my $pfx = ''; my $pfx = '';
if ($opt_j) { if ($opt_j) {
@ -118,10 +123,6 @@ while (<>) {
# Windows %#g prints it with seven significant digits instead of six # Windows %#g prints it with seven significant digits instead of six
s/ 0\.000000/ 0.00000/g s/ 0\.000000/ 0.00000/g
if $dump =~ /^[a-z]/; if $dump =~ /^[a-z]/;
### Trailing white space
# We don't really care for it in test output, and git's pre-commit
# hook flags it, which is annoying.
s/\s+$//;
print "$pfx$_\n"; print "$pfx$_\n";