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