Skip to content

Commit

Permalink
Issue #192: eradicate OutputBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Sep 23, 2020
1 parent 69245be commit 4634782
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions Kernel/System/UnitTest/Driver.pm
Original file line number Diff line number Diff line change
Expand Up @@ -417,23 +417,6 @@ sub _Print {
$ShortMessage = substr( $ShortMessage, 0, 2_000 ) . "[...]";
}

if ( $Self->{Verbose} || !$ResultOk ) {

if ( $Self->{SelfTest} ) {
# When Kernel::System::UnitTest is tested itself
# the we don't want to print the output of the tested functions,
# as this confused whoever is analysing the output.
}
else {
# Work around problem with leading \0 bytes in the output buffer
# which breaks the unicode output. The reason is not certain, maybe because of
# Perl's exception handling.
$Self->{OutputBuffer} =~ s{\0}{}g;
print $Self->{OutputBuffer};
}
}
$Self->{OutputBuffer} = '';

$Self->{TestCount}++;
if ($ResultOk) {
if ( $Self->{SelfTest} ) {
Expand Down
2 changes: 0 additions & 2 deletions Kernel/System/UnitTest/RegisterDriver.pm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ sub import {
);
$main::Self = $Kernel::OM->Get( 'Kernel::System::UnitTest::Driver' );

$main::Self->{OutputBuffer} = '';

return;
}

Expand Down

0 comments on commit 4634782

Please sign in to comment.