File: num_eq.t

package info (click to toggle)
liburi-perl 1.54-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 592 kB
  • ctags: 300
  • sloc: perl: 4,874; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -w

# Test URI's overloading of numeric comparision for checking object
# equality

use strict;
use Test::More 'no_plan';

use URI;

my $uri1 = URI->new("http://foo.com");
my $uri2 = URI->new("http://foo.com");

# cmp_ok() has a bug/misfeature where it strips overloading
# before doing the comparison.  So use a regular ok().
ok $uri1 == $uri1, "==";
ok $uri1 != $uri2, "!=";