1#!/usr/bin/perl -T
2
3use warnings;
4use strict;
5use Test::More tests => 3;
6use HTML::TreeBuilder;
7
8my $t = HTML::TreeBuilder->new;
9$t->parse('stuff <em name="foo">lalal</em>');
10$t->eof;
11my $c = $t->clone();
12
13#these are correct tests. Of what, I'm not sure.
14ok( $c->same_as($t), "\$c is the same as \$t, according to HTML::Element" );
15ok( $t->same_as($c), "\$t is the same as \$c, according to HTML::Element" );
16
17$c->delete();
18ok( $t->find_by_attribute( 'name', 'foo' ), "My name is foo after delete" );
19
20$t->delete();
21