Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 399640 Details for
Bug 544380
dev-perl/JavaScript-Packer-1.6.3 fails tests
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/1.006003/0001-test-fails.patch
0001-test-fails.patch (text/plain), 10.65 KB, created by
Kent Fredric (IRC: kent\n) (RETIRED)
on 2015-03-24 19:02:32 UTC
(
hide
)
Description:
files/1.006003/0001-test-fails.patch
Filename:
MIME Type:
Creator:
Kent Fredric (IRC: kent\n) (RETIRED)
Created:
2015-03-24 19:02:32 UTC
Size:
10.65 KB
patch
obsolete
>From 7d7581e5a26f113b89bbebbc3b9d1ca831117240 Mon Sep 17 00:00:00 2001 >From: Dominique Dumont <dod@debian.org> >Date: Thu, 9 Oct 2014 21:01:58 +0200 >Subject: [PATCH] fix test failures under perl 5.18 and 5.20 (patch from > Debian) > >--- > lib/JavaScript/Packer.pm | 8 ++++---- > t/02-io.t | 4 ++-- > t/scripts/s10-expected.js | 2 +- > t/scripts/s2-expected.js | 4 ++-- > t/scripts/s3-expected.js | 2 +- > t/scripts/s4-expected.js | 4 ++-- > t/scripts/s5-expected.js | 2 +- > t/scripts/s8-expected.js | 2 +- > 8 files changed, 14 insertions(+), 14 deletions(-) > >diff --git a/lib/JavaScript/Packer.pm b/lib/JavaScript/Packer.pm >index 0be201a..b95bea7 100644 >--- a/lib/JavaScript/Packer.pm >+++ b/lib/JavaScript/Packer.pm >@@ -413,7 +413,7 @@ sub minify { > my %shrunk_vars = map { $_ => 1 } ( ${$javascript} =~ /$SHRINK_VARS->{SHRUNK}/g ); > > my $cnt = 0; >- foreach my $shrunk_var ( keys( %shrunk_vars ) ) { >+ foreach my $shrunk_var ( sort keys( %shrunk_vars ) ) { > my $short_id; > do { > $short_id = $self->_encode52( $cnt++ ); >@@ -438,7 +438,7 @@ sub minify { > $words->{$_}->{count}++; > } > >- WORD: foreach my $word ( sort { $words->{$b}->{count} <=> $words->{$a}->{count} } keys( %{$words} ) ) { >+ WORD: foreach my $word ( sort { $words->{$b}->{count} <=> $words->{$a}->{count} } sort keys( %{$words} ) ) { > > if ( exists( $words->{$word}->{encoded} ) and $words->{$word}->{encoded} eq $word ) { > next WORD; >@@ -473,7 +473,7 @@ sub minify { > > my ( @pk, @pattern ) = ( (), () ); > >- foreach ( sort { $words->{$a}->{index} <=> $words->{$b}->{index} } keys( %{$words} ) ) { >+ foreach ( sort { $words->{$a}->{index} <=> $words->{$b}->{index} } sort keys( %{$words} ) ) { > $packed_length -= ( $words->{$_}->{count} * $words->{$_}->{minus} ); > > if ( $words->{$_}->{encoded} ne $_ ) { >@@ -645,7 +645,7 @@ sub _store_block_data { > if ( $do_shrink ) { > > my $cnt = 0; >- foreach my $block_var ( keys( %block_vars ) ) { >+ foreach my $block_var ( sort keys( %block_vars ) ) { > if ( length( $block_var ) ) { > while ( $block =~ /$SHRINK_VARS->{PREFIX}\Q$cnt\E\b/ ) { > $cnt++; >diff --git a/t/02-io.t b/t/02-io.t >index bb3b98b..e199e31 100644 >--- a/t/02-io.t >+++ b/t/02-io.t >@@ -25,7 +25,7 @@ SKIP: { > fileTest( 's7', 'clean', 'compression level "clean" function as argument' ); > fileTest( 's8', 'shrink', 'compression level "shrink" function as argument' ); > fileTest( 's9', 'shrink', 'compression level "shrink" with _no_shrink_ argument' ); >- fileTest( 's10', 'shrink', 'compression level "shrink" with qouted args' ); >+ fileTest( 's10', 'shrink', 'compression level "shrink" with quoted args' ); > > my $packer = JavaScript::Packer->init(); > >@@ -52,7 +52,7 @@ SKIP: { > is( > $var, > '/* BSD */' >- . "\neval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[01]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 1=2;',[],2,'var|x'.split('|'),0,{}))", >+ . "\neval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[01]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('1 0=2;',[],2,'x|var'.split('|'),0,{}))", > 'copyright option compression level "obfuscate"' > ); > >diff --git a/t/scripts/s10-expected.js b/t/scripts/s10-expected.js >index c50c937..c48da87 100644 >--- a/t/scripts/s10-expected.js >+++ b/t/scripts/s10-expected.js >@@ -1 +1 @@ >-function initScript(){var a=parseXML("config.xml").getElementsByTagName("config");var b=parseXML('konfig.xml').getElementsByTagName('konfig');var c='conf.xml';var e='conf';var d=parseXML(c).getElementsByTagName(e)} >\ No newline at end of file >+function initScript(){var c=parseXML("config.xml").getElementsByTagName("config");var e=parseXML('konfig.xml').getElementsByTagName('konfig');var b='conf.xml';var a='conf';var d=parseXML(b).getElementsByTagName(a)} >\ No newline at end of file >diff --git a/t/scripts/s2-expected.js b/t/scripts/s2-expected.js >index 9376c32..92b9fcf 100644 >--- a/t/scripts/s2-expected.js >+++ b/t/scripts/s2-expected.js >@@ -1,2 +1,2 @@ >-function(b){var a='blah blubb';var d=3;alert(a);var f=1;//@a >-var e=b;/*@abcd var f=1;@*/abcd var c=$H()};/*@abcd var x=1;@*/ >\ No newline at end of file >+function(c){var a='blah blubb';var e=3;alert(a);var d=1;//@a >+var b=c;/*@abcd var d=1;@*/abcd var f=$H()};/*@abcd var x=1;@*/ >\ No newline at end of file >diff --git a/t/scripts/s3-expected.js b/t/scripts/s3-expected.js >index 42ed508..2dbacb4 100644 >--- a/t/scripts/s3-expected.js >+++ b/t/scripts/s3-expected.js >@@ -1 +1 @@ >-eval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[024-9]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2(b){0 a=\'7 9\';0 d=3;8(a);0 6=1;//@a\n0 e=b;/*@4 0 6=1;@*/4 0 c=$5()};',[],10,'var||function||abcd|H|f|blah|alert|blubb'.split('|'),0,{})) >\ No newline at end of file >+eval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[024-9]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5(c){0 a=\'2 9\';0 e=3;8(a);0 d=1;//@a\n0 b=c;/*@4 0 d=1;@*/4 0 6=$7()};',[],10,'var||blah||abcd|function|f|H|alert|blubb'.split('|'),0,{})) >\ No newline at end of file >diff --git a/t/scripts/s4-expected.js b/t/scripts/s4-expected.js >index 9376c32..92b9fcf 100644 >--- a/t/scripts/s4-expected.js >+++ b/t/scripts/s4-expected.js >@@ -1,2 +1,2 @@ >-function(b){var a='blah blubb';var d=3;alert(a);var f=1;//@a >-var e=b;/*@abcd var f=1;@*/abcd var c=$H()};/*@abcd var x=1;@*/ >\ No newline at end of file >+function(c){var a='blah blubb';var e=3;alert(a);var d=1;//@a >+var b=c;/*@abcd var d=1;@*/abcd var f=$H()};/*@abcd var x=1;@*/ >\ No newline at end of file >diff --git a/t/scripts/s5-expected.js b/t/scripts/s5-expected.js >index e8ef66d..3fc9aca 100644 >--- a/t/scripts/s5-expected.js >+++ b/t/scripts/s5-expected.js >@@ -1 +1 @@ >-eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([2-9h-zB-Z]|1[0-9a-zA-Z])'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 I=7 3(){5 c=7 Y();5 d=3(g){8(!g.2(\'F\'))n;7 B.u(\'/9\'+g.2(\'F\')+\'x.w?\'+6.h(6.l()*m)+\'=\'+6.h(6.l()*m),{v:\'2\',y:3(a){5 f=7 K(\'R\').o(a.t.1k());f.1j(\'1c\').s(3(b){5 e=7 1b();e.N=b.10(\'N\');c[c.J]=e})}});8(g.2(\'L\')){g.2(\'L\').s(3(e){d(e)})}}n{Q:3(){5 b=C.U();b.s(3(e){d(e)})}}}5 9=7 3(){n{r:3(){5 g=$A(9.r.14);5 a=g.1d();8(!a){n}5 f=7 K(\'R\');f.13({\'19\':\'M\',\'1o\':\'M\'});8( $(\'i\').18()){7 q.1a(\'i\',{11:3(){7 B.u(\'/9\'+a+\'x.w?\'+6.h(6.l()*m)+\'=\'+6.h(6.l()*m),{v:\'2\',y:3(e){5 b=f.o(e.t); $(\'i\').o(b);7 q.G(\'i\',{H:0.E})}})},15:0.E})}O{7 B.u(\'/9\'+a+\'x.w?\'+6.h(6.l()*m)+\'=\'+6.h(6.l()*m),{v:\'2\',y:3(e){ $(\'i\').o(f.o(e.t));7 q.G(\'i\',{H:0.12})}})}}}}5 j=0;T.4.17({D:3(e){n 1i.D(e)},X:3(e){n e.16()}});3 p(b,e){b=b?b:\'/\';8(!j&&b){j=1;9.r(b);C.r(b);z()}}3 1h(b,e){8(!j){4.S(b,e)}p(b,e)}3 z(){5 e=$A(q.1f);8(e.J>0){Z("z();",1n)}O{j=0}}T.1m=3(){4.1e();4.1l(p);C.V();k=4.1g();k=k?k:\'/\';8(4.W()){8(!j){4.S(k,P)}p(k,P)}I.Q()}',[],87,'||get|function|dhtmlHistory|var|Math|new|if|content||||||||round|div_content|wait|initialLocation|random|99999|return|update|handle_location|Effect|process|each|responseText|Request|method|htm|index|onComplete|reset_wait||Ajax|menu|toJSON|01|loc|Appear|from|image|length|Element|subs|0px|src|else|null|preload|div|add|window|get_menu_hash|init|isFirstLoad|fromJSON|Array|setTimeout|readAttribute|afterFinish|00|setStyle|arguments|to|evalJSON|create|visible|padding|Fade|Image|img|shift|initialize|Queue|getCurrentLocation|handle_click|Object|select|stripScripts|addListener|onload|1000|margin'.split('|'),0,{})) >\ No newline at end of file >+eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([2-9h-zB-Z]|1[0-9a-zA-Z])'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 L=7 3(){5 g=7 W();5 f=3(e){9(!e.4(\'N\'))l;7 s.t(\'/h\'+e.4(\'N\')+\'w.v?\'+6.m(6.k()*8)+\'=\'+6.m(6.k()*8),{y:\'4\',z:3(d){5 c=7 G(\'I\').o(d.C.1m());c.1i(\'1a\').u(3(b){5 a=7 Y();a.Q=b.1h(\'Q\');g[g.M]=a})}});9(e.4(\'R\')){e.4(\'R\').u(3(a){f(a)})}}l{P:3(){5 b=x.18();b.u(3(a){f(a)})}}}5 h=7 3(){l{r:3(){5 c=$A(h.r.13);5 e=c.1l();9(!e){l}5 d=7 G(\'I\');d.1j({\'1g\':\'E\',\'1e\':\'E\'});9( $(\'i\').1o()){7 p.X(\'i\',{12:3(){7 s.t(\'/h\'+e+\'w.v?\'+6.m(6.k()*8)+\'=\'+6.m(6.k()*8),{y:\'4\',z:3(a){5 b=d.o(a.C); $(\'i\').o(b);7 p.F(\'i\',{K:0.D})}})},1n:0.D})}J{7 s.t(\'/h\'+e+\'w.v?\'+6.m(6.k()*8)+\'=\'+6.m(6.k()*8),{y:\'4\',z:3(a){ $(\'i\').o(d.o(a.C));7 p.F(\'i\',{K:0.U})}})}}}}5 n=0;T.2.14({S:3(a){l Z.S(a)},16:3(a){l a.15()}});3 q(b,a){b=b?b:\'/\';9(!n&&b){n=1;h.r(b);x.r(b);B()}}3 19(b,a){9(!n){2.H(b,a)}q(b,a)}3 B(){5 a=$A(p.10);9(a.M>0){1k("B();",V)}J{n=0}}T.1f=3(){2.1c();2.11(q);x.1b();j=2.17();j=j?j:\'/\';9(2.1d()){9(!n){2.H(j,O)}q(j,O)}L.P()}',[],87,'||dhtmlHistory|function|get|var|Math|new|99999|if||||||||content|div_content|initialLocation|random|return|round|wait|update|Effect|handle_location|process|Ajax|Request|each|htm|index|menu|method|onComplete||reset_wait|responseText|01|0px|Appear|Element|add|div|else|from|image|length|loc|null|preload|src|subs|toJSON|window|00|1000|Array|Fade|Image|Object|Queue|addListener|afterFinish|arguments|create|evalJSON|fromJSON|getCurrentLocation|get_menu_hash|handle_click|img|init|initialize|isFirstLoad|margin|onload|padding|readAttribute|select|setStyle|setTimeout|shift|stripScripts|to|visible'.split('|'),0,{})) >\ No newline at end of file >diff --git a/t/scripts/s8-expected.js b/t/scripts/s8-expected.js >index 0d9c646..562faed 100644 >--- a/t/scripts/s8-expected.js >+++ b/t/scripts/s8-expected.js >@@ -1 +1 @@ >-function(b){var d=x;var c=y;var a=(function(){return[].concat(arguments)[0][0]!==1})(1,do_somthing(do_something_else(d,c),d));if(a)arrayProto.concat=concat} >\ No newline at end of file >+function(d){var b=x;var c=y;var a=(function(){return[].concat(arguments)[0][0]!==1})(1,do_somthing(do_something_else(b,c),b));if(a)arrayProto.concat=concat} >\ No newline at end of file >-- >2.2.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 544380
: 399640 |
399642