1
# $Id: 07magic.t,v 1.2 2005/04/20 15:49:35 ray Exp $
2
# Before `make install' is performed this script should be runnable with
3
# `make test'. After `make install' it should work as `perl test.pl'
5
######################### We start with some black magic to print on failure.
7
# Change 1..1 below to 1..last_test_to_print .
8
# (It may become useful if the test is moved to ./t subdirectory.)
10
BEGIN { $| = 1; print "1..2\n"; }
11
END {print "not ok 1\n" unless $loaded;}
17
######################### End of black magic.
19
# Insert your test code below (better if it prints "ok 13"
20
# (correspondingly "not ok 13") depending on the success of chunk 13
26
sub ok { printf("ok %d\n", $test++); }
27
sub not_ok { printf("not ok %d\n", $test++); }
33
use Scalar::Util qw( weaken );
35
my $x = { a => "worked\n" };
38
my $z = Clone::clone($x);
39
Dumper($x) eq Dumper($z) ? ok : not_ok;
41
# print Dumper($a, $b);
42
# print Dumper($a, $c);