|
Revision 2583, 0.8 kB
(checked in by mpaschal, 18 months ago)
|
|
Add Test::Deep to t/lib, since we already use it in driver-tests.pl
BugzID: 79953
|
| Line | |
|---|
| 1 | use strict; |
|---|
| 2 | use warnings; |
|---|
| 3 | |
|---|
| 4 | # this is for people who don't want Test::Builder to be loaded but want to |
|---|
| 5 | # use eq_deeply. It's a bit hacky... |
|---|
| 6 | |
|---|
| 7 | package Test::Deep::NoTest; |
|---|
| 8 | |
|---|
| 9 | use vars qw( $NoTest ); |
|---|
| 10 | |
|---|
| 11 | { |
|---|
| 12 | local $NoTest = 1; |
|---|
| 13 | require Test::Deep; |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | sub import { |
|---|
| 17 | my $import = Test::Deep->can("import"); |
|---|
| 18 | # make the stack look like it should for use Test::Deep |
|---|
| 19 | my $pkg = shift; |
|---|
| 20 | unshift(@_, "Test::Deep"); |
|---|
| 21 | goto &$import; |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | 1; |
|---|
| 25 | |
|---|
| 26 | =head1 NAME |
|---|
| 27 | |
|---|
| 28 | Test::Deep::NoTest - Use Test::Deep outside of the testing framework |
|---|
| 29 | |
|---|
| 30 | =head1 SYNOPSIS |
|---|
| 31 | |
|---|
| 32 | use Test::Deep::NoTest; |
|---|
| 33 | |
|---|
| 34 | if eq_deeply($a, $b) { |
|---|
| 35 | print "they were deeply equal\n"; |
|---|
| 36 | }; |
|---|
| 37 | |
|---|
| 38 | =head1 DESCRIPTION |
|---|
| 39 | |
|---|
| 40 | This exports all the same things as Test::Deep but it does not load |
|---|
| 41 | Test::Builder so it can be used in ordinary non-test situations. |
|---|