Test failures due to hash randomisation in perl 5.17.6 #5

Closed
ronsavage opened this Issue Dec 20, 2012 · 0 comments

2 participants

@ronsavage

I've make several patches to V 2.12 of Text::vCard, so the tests now pass under Perl V 5.17.6.
I don't see how to add a file, so here's the diff:
diff -ur Text-vCard-2.12.bak/lib/Text/vCard/Node.pm Text-vCard-2.12/lib/Text/vCard/Node.pm
--- Text-vCard-2.12.bak/lib/Text/vCard/Node.pm 2012-12-20 13:40:59.000000000 +1100
+++ Text-vCard-2.12/lib/Text/vCard/Node.pm 2012-12-20 13:41:24.000000000 +1100
@@ -222,7 +222,7 @@
my $self = shift;
my @types;
return undef unless defined $self->{params};

Only in Text-vCard-2.12: MYMETA.json
Only in Text-vCard-2.12: MYMETA.yml
diff -ur Text-vCard-2.12.bak/t/05-export.t Text-vCard-2.12/t/05-export.t
--- Text-vCard-2.12.bak/t/05-export.t 2012-12-20 13:41:08.000000000 +1100
+++ Text-vCard-2.12/t/05-export.t 2012-12-20 13:41:35.000000000 +1100
@@ -21,7 +21,7 @@
'TEL;pref;home:020 666 6666',
'TEL;cell:0777 777 7777',
'item2.ADR;work:;;Test Road;Test City;;Test Postcode;Test Country',

  • 'item1.ADR;TYPE=pref,home:;;Pref Test Road;Pref Test City;;Pref Test Postcode;Pref Test Country',
  • 'item1.ADR;TYPE=home,pref:;;Pref Test Road;Pref Test City;;Pref Test Postcode;Pref Test Country', 'VERSION:3.0', 'FN:T-firstname T-surname', 'END:VCARD', @@ -49,16 +49,16 @@ 'item1.X-ABADR;charset=utf-8:uk', 'item2.X-ABADR;charset=utf-8:uk', 'N;charset=utf-8:T-surname;T-first;;;',
  • 'TEL;charset=utf-8;TYPE=pref,home:020 666 6666',
  • 'TEL;charset=utf-8;TYPE=home,pref:020 666 6666', 'TEL;charset=utf-8;TYPE=cell:0777 777 7777', 'item2.ADR;charset=utf-8;TYPE=work:;;Test Road;Test City;;Test Postcode;Test Country',
  • 'item1.ADR;charset=utf-8;TYPE=pref,home:;;Pref Test Road;Pref Test City;;Pref Test Postcode;Pref Test Country',
  • 'item1.ADR;charset=utf-8;TYPE=home,pref:;;Pref Test Road;Pref Test City;;Pref Test Postcode;Pref Test Country',
    'VERSION;charset=utf-8:3.0',
    'FN;charset=utf-8:T-firstname T-surname',
    'END:VCARD',
    );
    @lines = split( "\r\n", $adbk->export() );
    -is_deeply( \@lines, \@data,
    +is_deeply( [sort @lines], [sort @data],
    'set_encoding() - returned data matched that expected' );

    #is_deeply(\@lines,\@data,'export() - returned data matched that expected');

Also, I'll add a note in RT#81502.

Cheers
Ron Savage

@ranguard ranguard added a commit that closed this issue Dec 20, 2012
@ranguard Fixes #5 and RT81502 - as patched by Ron Savage
Perl V 5.17.6 has a change that showes the
bug in the tests relying on the sort order which
is now explicit
199323f
@ranguard ranguard closed this in 199323f Dec 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment