test11 341 B

123456789101112131415161718192021222324
  1. #!/usr/bin/perl
  2. #
  3. use strict;
  4. use warnings;
  5. use lib "..";
  6. use Tpl;
  7. my $pwd = `pwd`;
  8. chomp $pwd;
  9. my $tmp1 = "$pwd/$0_1.out";
  10. my $i;
  11. my $tpl = Tpl->tpl_map("B",\$i);
  12. $i = pack("CCCC", 0xA, 0xB, 0xC, 0xD);
  13. $tpl->tpl_pack(0);
  14. $tpl->tpl_dump($tmp1);
  15. $tpl = Tpl->tpl_map("B",\$i);
  16. $tpl->tpl_load($tmp1);
  17. $tpl->tpl_unpack(0);
  18. print "$i\n";