From: Paul Marquess Date: Sun, 29 Oct 2006 21:03:21 +0000 (+0000) Subject: [PATHCH] Scalar::Util::readonly ... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=802134916c56985ba8dc700565240474646eb9f7;p=p5sagit%2Fp5-mst-13.2.git [PATHCH] Scalar::Util::readonly & compression (was RE: Change 29117: [PATCH] IO::Compress modules) From: "Paul Marquess" Message-ID: <02cf01c6fb9d$ade808a0$6501a8c0@myopwv.com> Date: Sun, 29 Oct 2006 21:03:21 -0000 p4raw-id: //depot/perl@29140 --- diff --git a/ext/Compress/IO/Base/t/01misc.t b/ext/Compress/IO/Base/t/01misc.t index 29b2a76..fd8cf66 100644 --- a/ext/Compress/IO/Base/t/01misc.t +++ b/ext/Compress/IO/Base/t/01misc.t @@ -56,9 +56,18 @@ sub My::testParseParameters() like $@, mkErr("Parameter 'Fred' must be a signed int, got 'abc'"), "wanted signed, got 'abc'"; - eval { ParseParameters(1, {'Fred' => [1, 1, Parse_writable_scalar, 0]}, Fred => 'abc') ; }; - like $@, mkErr("Parameter 'Fred' not writable"), - "wanted writable, got readonly"; + + SKIP: + { + use Config; + + skip 'readonly + threads', 1 + if $Config{useithreads}; + + eval { ParseParameters(1, {'Fred' => [1, 1, Parse_writable_scalar, 0]}, Fred => 'abc') ; }; + like $@, mkErr("Parameter 'Fred' not writable"), + "wanted writable, got readonly"; + } my @xx; eval { ParseParameters(1, {'Fred' => [1, 1, Parse_writable_scalar, 0]}, Fred => \@xx) ; }; diff --git a/t/lib/compress/oneshot.pl b/t/lib/compress/oneshot.pl index 64588c2..ebfd042 100644 --- a/t/lib/compress/oneshot.pl +++ b/t/lib/compress/oneshot.pl @@ -165,9 +165,18 @@ sub run my $out ; my @x ; - eval { $a = $Func->(\$in, \$out, TrailingData => \"abc") ;} ; - like $@, mkErr("^$TopType: Parameter 'TrailingData' not writable"), - ' TrailingData output not writable'; + SKIP: + { + use Config; + + skip 'readonly + threads', 1 + if $Config{useithreads}; + + + eval { $a = $Func->(\$in, \$out, TrailingData => \"abc") ;} ; + like $@, mkErr("^$TopType: Parameter 'TrailingData' not writable"), + ' TrailingData output not writable'; + } eval { $a = $Func->(\$in, \$out, TrailingData => \@x) ;} ; like $@, mkErr("^$TopType: Parameter 'TrailingData' not a scalar reference"),