blob: 066d84c660e491b038dafc4ba20c0ff7b61a5058 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# Test URI's overloading of numeric comparison for checking object
# equality
use strict;
use warnings;
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, "!=";
|