Upgrade to Test-Simple-0.82.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / explain.t
1 #!/usr/bin/perl -w
2 # $Id: /mirror/googlecode/test-more/t/explain.t 60308 2008-09-07T22:36:18.175234Z schwern  $
3
4 BEGIN {
5     if( $ENV{PERL_CORE} ) {
6         chdir 't';
7         @INC = ('../lib', 'lib');
8     }
9     else {
10         unshift @INC, 't/lib';
11     }
12 }
13
14 use strict;
15 use warnings;
16
17 use Test::More tests => 5;
18
19 can_ok "main", "explain";
20
21 is_deeply [explain("foo")],             ["foo"];
22 is_deeply [explain("foo", "bar")],      ["foo", "bar"];
23
24 # Avoid future dump formatting changes from breaking tests by just eval'ing
25 # the dump
26 is_deeply [map { eval $_ } explain([], {})],           [[], {}];
27
28 is_deeply [map { eval $_ } explain(23, [42,91], 99)],  [23, [42, 91], 99];