1#!/usr/bin/perl -w 2 3BEGIN { 4 if( $ENV{PERL_CORE} ) { 5 chdir 't'; 6 @INC = ('../lib', 'lib'); 7 } 8 else { 9 unshift @INC, 't/lib'; 10 } 11} 12 13use strict; 14use warnings; 15 16use Test::More tests => 5; 17 18can_ok "main", "explain"; 19 20is_deeply [explain("foo")], ["foo"]; 21is_deeply [explain("foo", "bar")], ["foo", "bar"]; 22 23# Avoid future dump formatting changes from breaking tests by just eval'ing 24# the dump 25is_deeply [map { eval $_ } explain([], {})], [[], {}]; 26 27is_deeply [map { eval $_ } explain(23, [42,91], 99)], [23, [42, 91], 99]; 28