HEX
Server: Apache
System: Linux server-674799.igrow.ws 5.14.0-611.30.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 11 06:42:00 EST 2026 x86_64
User: elrashedytravel (1025)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/.cpan/build/URI-5.29-0/t/userpass.t
use strict;
use warnings;

use Test::More;

use URI;

my $uri = URI->new('rsync://foo:bar@example.com');
like $uri->as_string, qr/foo:bar\@example\.com/, 'userinfo is included';

$uri->password(undef);
like $uri->as_string, qr/foo\@example\.com/, 'set password to undef';

$uri = URI->new('rsync://0:bar@example.com');
$uri->password(undef);
like $uri->as_string, qr/0\@example\.com/, '... also for username "0"';

done_testing;