[perl-Glib-Object-Introspection] Make the test skip conditions more robust



commit 9c32d44650700087bb34bfc276d21ccc4186d8ad
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date:   Tue Aug 9 16:58:37 2011 +0200

    Make the test skip conditions more robust

 t/inc/setup.pl |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/t/inc/setup.pl b/t/inc/setup.pl
index dace880..fcdefa1 100644
--- a/t/inc/setup.pl
+++ b/t/inc/setup.pl
@@ -1,13 +1,16 @@
 use Glib::Object::Introspection;
 use Test::More;
 
-unless ($ENV{LD_LIBRARY_PATH} =~ m/\bbuild\b/) {
-  plan skip_all => 'Need "build" in LD_LIBRARY_PATH';
-}
 unless (-e 'build/libregress.so') {
   plan skip_all => 'Need the test libraries';
 }
 
+unless (defined $ENV{LD_LIBRARY_PATH} &&
+        $ENV{LD_LIBRARY_PATH} =~ m/\bbuild\b/)
+{
+  plan skip_all => 'Need "build" in LD_LIBRARY_PATH';
+}
+
 Glib::Object::Introspection->setup(
   basename => 'Regress',
   version => '1.0',



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