File: ipv4FFFF.t

package info (click to toggle)
libnetaddr-ip-perl 4.079%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 1,580 kB
  • ctags: 251
  • sloc: perl: 1,417; cpp: 67; sh: 51; makefile: 9
file content (18 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

#use diagnostics;
use NetAddr::IP::Lite;

$| = 1;

print "1..1\n";

my $test = 1;
sub ok() {
  print 'ok ',$test++,"\n";
}

my $ip = new6FFFF NetAddr::IP::Lite('127.0.0.1');
my $exp = '0:0:0:0:0:FFFF:7F00:1/128';
print "got: $ip\nexp: $exp\nnot "
	unless "$ip" eq $exp;
&ok;