Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-XMPP CPAN distribution.

Report information
The Basics
Id: 8888
Status: resolved
Priority: 0/
Queue: Net-XMPP

People
Owner: reatmon [...] mail.com
Requestors: at [...] altlinux.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.0
Fixed in: (no value)



Subject: %query isn't empty in t/roster.t:80
Hello, I noticed that Net-XMPP-1.0 distribution has its own copy of Test::More in t/lib directory. I tried to build Net-XMPP against a recent version of Test::More from CPAN (version 0.53) and I believe I found a bug in t/roster.t. Test 26 fails with the following output: t/roster.................NOK 26 # Failed test (t/roster.t at line 80) # Structures begin differing at: # $got->{groups} = 'ARRAY(0x87b0694)' # $expected->{groups} = Does not exist The code is: is_deeply( \%query, { }, "jid1 - query"); Now, if you `use Data::Dumper' and `print Dumper(\%query)', you'll get the following result: $VAR1 = { 'groups' => [] }; So it's pretty obvious that this condition should not actually hold. Apparently Test::More 0.47 is buggy: $ perl -It/lib -MTest::More=no_plan -le 'print is_deeply { anything => [] }, { }' ok 1 1 1..1 $ The attached patch fixes the problem. And thanks for Net::XMPP and Net::Jabber. -- Alexey Tourbin ALT Linux Team
--- Net-XMPP-1.0/t/roster.t~ 2004-08-12 13:47:48 +0000 +++ Net-XMPP-1.0/t/roster.t 2004-12-15 02:19:05 +0000 @@ -77,7 +77,7 @@ is($jids[0]->GetJID(), $jid1, "nogroup - jid1 matched"); my %query = $Roster->query($jid1); -is_deeply( \%query, { }, "jid1 - query"); +is_deeply( \%query, { groups => [] }, "jid1 - query"); %query = $Roster->query($jid2); is_deeply( \%query, { ask=>"no",groups=>[$group1,$group2],name=>"Test",subscription=>"both"}, "jid2 - query");