Changeset 10132
- Timestamp:
- 04/22/08 15:47:11 (5 years ago)
- Location:
- lang/perl/Test-Declare/trunk
- Files:
-
- 2 removed
- 1 modified
-
lib/Test/Declare.pm (modified) (3 diffs)
-
t/04_prints_ok.t (deleted)
-
t/05_stderr_ok.t (deleted)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Test-Declare/trunk/lib/Test/Declare.pm
r9550 r10132 27 27 use Test::Exception; 28 28 use Test::Warn; 29 use Test::Output; 29 30 use Test::Deep; 30 31 … … 35 36 prints_ok stderr_ok 36 37 warning_like warnings_like warning_is warnings_are 38 stdout_is stdout_isnt stdout_like stdout_unlike 39 stderr_is stderr_isnt stderr_like stderr_unlike 40 combined_is combined_isnt combined_like combined_unlike 41 output_is output_isnt output_like output_unlike 37 42 ); 38 43 … … 106 111 my $test_more_code = "Test\::More"->can('ok'); 107 112 goto $test_more_code, $test, $name||$test_block_name; 108 }109 110 ## original method111 use IO::Scalar;112 sub prints_ok (&$;$) { ## no critic113 my ($code, $expected, $name) = @_;114 115 tie *STDOUT, 'IO::Scalar', \my $stdout;116 $code->();117 like($stdout, qr/$expected/, $name||$test_block_name);118 untie *STDOUT;119 }120 sub stderr_ok (&$;$) { ## no critic121 my ($code, $expected, $name) = @_;122 123 tie *STDERR, 'IO::Scalar', \my $stderr;124 $code->();125 like($stderr, qr/$expected/, $name||$test_block_name);126 untie *STDERR;127 113 } 128 114
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)