forked from Mirrors/freeswitch
30 lines
536 B
Perl
Executable File
30 lines
536 B
Perl
Executable File
#!/usr/bin/perl
|
|
#
|
|
use strict;
|
|
use warnings;
|
|
|
|
use lib "..";
|
|
use Tpl;
|
|
|
|
my $pwd = `pwd`;
|
|
chomp $pwd;
|
|
|
|
my $tmp1 = "$pwd/$0_1.out";
|
|
my $tmp2 = "$pwd/$0_2.out";
|
|
my $tmp3 = "$pwd/$0_3.out";
|
|
|
|
my $i;
|
|
my $tpl = Tpl->tpl_map("A(s)",\$i);
|
|
for (qw(normal has&ersand <anglebrackets>)) {
|
|
$i = $_;
|
|
$tpl->tpl_pack(1);
|
|
}
|
|
$tpl->tpl_dump($tmp1);
|
|
|
|
|
|
`../tplxml $tmp1 > $tmp2`; # convert tpl to xml
|
|
`../tplxml $tmp2 > $tmp3`; # convert xml back to tpl
|
|
`diff $tmp1 $tmp3`;
|
|
print "tpl files ", ($? ? "differ" : "identical"), "\n";
|
|
|