Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure getOutput is not affected by CHECK_PRINT.

  • Loading branch information...
commit 16abe516f4a44db761c9004632433cc418cd268f 1 parent b3d98d4
@josephw authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 XML/t/01_main.t
View
15 XML/t/01_main.t
@@ -14,7 +14,7 @@ use strict;
use Errno;
-use Test::More(tests => 223);
+use Test::More(tests => 225);
# Catch warnings
@@ -1877,6 +1877,19 @@ TEST: {
$w->xmlDecl();
};
+# getOutput() with CHECK_PRINT should get the underlying stream, not the wrapper
+TEST: {
+ initEnv(CHECK_PRINT => 1);
+
+ my $out = $w->getOutput();
+
+ $w->setOutput(\*STDERR);
+ is($w->getOutput(), \*STDERR, 'Changing output should be reflected in a subsequent get');
+
+ $w->setOutput($out);
+ is ($w->getOutput(), $out, 'Changing output back should succeed');
+};
+
# Free test resources
$outputFile->close() or die "Unable to close temporary file: $!";
Please sign in to comment.
Something went wrong with that request. Please try again.