perl 3.0 patch #22 patch #19, continued
[p5sagit/p5-mst-13.2.git] / t / op.pack
1 #!./perl
2
3 # $Header: op.pack,v 3.0 89/10/18 15:30:39 lwall Locked $
4
5 print "1..3\n";
6
7 $format = "c2x5CCxsila6";
8 @ary = (1,-100,127,128,32767,12345,123456,"abcdef");
9 $foo = pack($format,@ary);
10 @ary2 = unpack($format,$foo);
11
12 print ($#ary == $#ary2 ? "ok 1\n" : "not ok 1\n");
13
14 $out1=join(':',@ary);
15 $out2=join(':',@ary2);
16 print ($out1 eq $out2 ? "ok 2\n" : "not ok 2\n");
17
18 print ($foo =~ /def/ ? "ok 3\n" : "not ok 3\n");