Re: com php-src: Make output order for dom007.phpt platform independent: ext/dom/tests/dom007.phpt

From: Date: Wed, 02 May 2012 02:14:09 +0000
Subject: Re: com php-src: Make output order for dom007.phpt platform independent: ext/dom/tests/dom007.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-68913@lists.php.net to get a copy of this message
On Wed, May 2, 2012 at 6:43 AM, Christopher Jones <sixd@php.net> wrote: > Commit:    d14f23365cda4e830aa09fcf1d64c07c4fde21c9 > Author:    Christopher Jones <sixd@php.net>         Tue, 1 May 2012 15:43:31 -0700 > Parents:   02e25df8b5a7c60364c7153c03da59de3a556a87 > Branches:  PHP-5.3 PHP-5.4 master > > Link:       �­ > ¤�hc§[¸«ƒZŒøhttp://git.php.net/?p=php-src.git;a=commitdiff;h=d14f23365cda4e830aa09fcf1d64c07c4fde21c9 > > Log: > Make output order for dom007.phpt platform independent > > This test has long been near the top of the reported output diffs. > For example, on http://qa.php.net/reports/?version=5.4.0 it has > diffed > 1307 times out of 3543 reports, at time of this commit.  (The second > highest diff has occurred 710 times.) thanks for the fix :) > > Changed paths: >  M  ext/dom/tests/dom007.phpt > > > Diff: > diff --git a/ext/dom/tests/dom007.phpt b/ext/dom/tests/dom007.phpt > index 649d630..5d12aa3 100644 > --- a/ext/dom/tests/dom007.phpt > +++ b/ext/dom/tests/dom007.phpt > @@ -63,12 +63,24 @@ echo "\n"; >  $ents = $dtd->entities; >  $length = $ents->length; >  echo "Length: ".$length."\n"; > + > +$xkeys = array(); >  foreach ($ents AS $key=>$node) { > -       echo "Key: $key Name: ".$node->nodeName."\n"; > +       $xkeys[] = "Key: $key Name: ".$node->nodeName."\n"; > +} > +sort($xkeys);  // fix inconsistent output ordering (bug #61810) > +foreach ($xkeys as $key => $node) { > +       echo $node; >  } >  echo "\n"; > + > +$xkeys = array(); >  for($x=0; $x < $length; $x++) { > -       echo "Index $x: ".$ents->item($x)->nodeName."\n"; > +       $xkeys[] = "Index: ".$ents->item($x)->nodeName."\n"; > +} > +sort($xkeys);  // fix inconsistent output ordering (bug #61810) > +foreach ($xkeys as $key => $node) { > +       echo $node; >  } > >  echo "\n"; > @@ -87,13 +99,13 @@ Index 0: GIF (image/gif) (-) >  NULL > >  Length: 3 > -Key: test Name: test > -Key: rdf Name: rdf >  Key: myimage Name: myimage > +Key: rdf Name: rdf > +Key: test Name: test > > -Index 0: test > -Index 1: rdf > -Index 2: myimage > +Index: myimage > +Index: rdf > +Index: test > >  NULL >  NULL > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence  Xinchen Hui http://www.laruence.com/

« previous php.cvs (#68913) next »