[perl-Champlain] Skip tests needing Memphis support



commit 0d7ff52e8747bf547e8554ec723e53c42e222f27
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date:   Tue May 18 21:49:38 2010 +0200

    Skip tests needing Memphis support

 t/ChamplainMapSourceFactory.t |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)
---
diff --git a/t/ChamplainMapSourceFactory.t b/t/ChamplainMapSourceFactory.t
index 7f3f56a..6cf4863 100644
--- a/t/ChamplainMapSourceFactory.t
+++ b/t/ChamplainMapSourceFactory.t
@@ -80,17 +80,24 @@ sub test_map_factory {
 		"Maps for Free Relief"
 	);
 
-	generic_create(
-		$factory,
-		Champlain::MapSourceFactory->MEMPHIS_LOCAL_DESC,
-		"OpenStreetMap Memphis Local Map"
-	);
+	if (Champlain::HAS_MEMPHIS) {
+		generic_create(
+			$factory,
+			Champlain::MapSourceFactory->MEMPHIS_LOCAL_DESC,
+			"OpenStreetMap Memphis Local Map"
+		);
 
-	generic_create(
-		$factory,
-		Champlain::MapSourceFactory->MEMPHIS_NETWORK_DESC,
-		"OpenStreetMap Memphis Network Map"
-	);
+		generic_create(
+			$factory,
+			Champlain::MapSourceFactory->MEMPHIS_NETWORK_DESC,
+			"OpenStreetMap Memphis Network Map"
+		);
+	}
+	else {
+		SKIP: {
+			skip "No support for Memphis", 6;
+		};
+	}
 
 	# Get the maps available
 	my @maps = $factory->dup_list();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]