X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=t%2Fsame_as.t;fp=t%2Fsame_as.t;h=0000000000000000000000000000000000000000;hb=f25dca7f18cd90087a76cda08b300221de93e5db;hp=285f64c6fa272fa1d018561e6a45568c4c727bae;hpb=3caedb5b3a025561935df4403083c02425cb3845;p=html-element-library.git diff --git a/t/same_as.t b/t/same_as.t deleted file mode 100644 index 285f64c..0000000 --- a/t/same_as.t +++ /dev/null @@ -1,43 +0,0 @@ -# This might look like shell script, but it's actually -*- perl -*- -use strict; -use lib qw(t/ t/m/); - -use File::Slurp; -use Test::More qw(no_plan); - -use TestUtils; -use HTML::TreeBuilder; -use HTML::Element::Library; - -sub replace_age { - my $branch = shift; - my $age = shift; - $branch->look_down(id => 'age')->replace_content($age); -} - - -sub tage { - - my $root = "t/html/same_as/same_as"; - - my $tree = HTML::TreeBuilder->new_from_file("$root.initial"); - - #warn "TREE: $tree" . $tree->as_HTML; - - my %data = (people_id => 888, phone => '444-4444', email => 'm@xml.com'); - - $tree->hash_map - (hash => \%data, - to_attr => 'sid', - excluding => [ 'email' ], - debug => 1 - ); - - my $generated_html = ptree($tree, "$root.gen"); - - is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML for same_as"); -} - - -tage(); -