File: 10intRT48594.t

package info (click to toggle)
libphp-serialization-perl 0.34-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 387; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 389 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env perl
use strict;
use warnings;

use PHP::Serialization;
use Test::More tests => 2;

my $a = {'020' => '001'};
my $str = PHP::Serialization::serialize( $a );
is($str,'a:1:{s:3:"020";s:3:"001";}', 'Keys and vals are string for 0 prefixed numbers');

my $b = {'0' => '0'};
$str = PHP::Serialization::serialize( $b );
is($str,'a:1:{i:0;i:0;}', 'Keys and vals are ints for 0');