[svn:parrot] r49066 - trunk/t/library

fperrad at svn.parrot.org fperrad at svn.parrot.org
Thu Sep 16 18:29:40 UTC 2010


Author: fperrad
Date: Thu Sep 16 18:29:40 2010
New Revision: 49066
URL: https://trac.parrot.org/parrot/changeset/49066

Log:
[t] refactor with skip_all (missing part of r48955)

Modified:
   trunk/t/library/archive_zip.t

Modified: trunk/t/library/archive_zip.t
==============================================================================
--- trunk/t/library/archive_zip.t	Thu Sep 16 16:16:45 2010	(r49065)
+++ trunk/t/library/archive_zip.t	Thu Sep 16 18:29:40 2010	(r49066)
@@ -18,23 +18,23 @@
 
 .sub 'main' :main
     .include 'test_more.pir'
+    .include 'iglobals.pasm'
+    .local pmc config_hash, interp
+
+    interp = getinterp
+    config_hash = interp[.IGLOBALS_CONFIG_HASH]
+    $S0 = config_hash['has_zlib']
+    unless $S0 goto no_zlib
 
-    push_eh no_zlib_support
-    load_bytecode 'Archive/Zip.pir'
-    pop_eh
-    goto have_zlib_support
-  no_zlib_support:
-    .get_results($P0)
-    finalize $P0
-    pop_eh
-    plan(1)
-    ok(1, "Test irrelevant without zlib support built-in")
-    goto zlib_test_end
-  have_zlib_support:
     plan(14)
+    load_bytecode 'Archive/Zip.pir'
     test_new()
     test_pack()
-  zlib_test_end:
+    .return()
+
+  no_zlib:
+    skip_all('No zlib library available')
+    .return()
 .end
 
 .sub 'test_new'


More information about the parrot-commits mailing list