File: fixtest

package info (click to toggle)
libgeo-converter-wkt2kml-perl 0.0.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 148 kB
  • sloc: perl: 139; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 963 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fixed a test that fails due to hash randomization
Author: Francesco Paolo Lovergine <frankie@debian.org>
Forwarded: no

--- a/t/02.kml2wkt.t
+++ b/t/02.kml2wkt.t
@@ -102,9 +102,9 @@
 GEOMETRYCOLLECTION(LINESTRING(4 6,7 10),POINT(4 6))
 --- expected
 <MultiGeometry>
-<Point><coordinates>4,6</coordinates></Point>
 <LineString><coordinates>4,6
 7,10</coordinates></LineString>
+<Point><coordinates>4,6</coordinates></Point>
 </MultiGeometry>
 
 === test polygon
--- a/lib/Geo/Converter/WKT2KML.pm
+++ b/lib/Geo/Converter/WKT2KML.pm
@@ -121,7 +121,7 @@
         '(' . join( '),(', map { coordbuilder($_) } @lnr ) . ')';
     },
     'MultiGeometry' => sub {
-        my @key = grep { $builder->{$_} } keys %{$_[0]->[0]};
+        my @key = grep { $builder->{$_} } sort keys %{$_[0]->[0]};
         my $buf = join( ',', map { kml2wktbuilder( $_, $_[0]->[0]->{$_} ) } @key );
         $buf    = "GEOMETRYCOLLECTION($buf)" if ( @key > 1 );
         $buf;