Front page | perl.perl5.changes |
Postings from May 2011
[perl.git] branch smoke-me/runperl, updated. v5.14.0-302-ga6030d1
From:
Nicholas Clark
Date:
May 27, 2011 07:57
Subject:
[perl.git] branch smoke-me/runperl, updated. v5.14.0-302-ga6030d1
Message ID:
E1QPyT9-00067G-Sq@camel.ams6.corp.booking.com
In perl.git, the branch smoke-me/runperl has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/a6030d187cf68a69ad2741e23adfd775bed01461?hp=eae102fccb4ba076628228420a132af06ebb2b57>
- Log -----------------------------------------------------------------
commit a6030d187cf68a69ad2741e23adfd775bed01461
Author: Nicholas Clark <nick@ccl4.org>
Date: Fri May 27 15:55:15 2011 +0100
Convert B::Deparse's core.t to Test::More.
Bring the joy of strict to it, remove the unused variable @bin, and convert a
literal carriage return to a newline.
-----------------------------------------------------------------------
Summary of changes:
dist/B-Deparse/t/core.t | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/dist/B-Deparse/t/core.t b/dist/B-Deparse/t/core.t
index 9c832c6..bddbf88 100644
--- a/dist/B-Deparse/t/core.t
+++ b/dist/B-Deparse/t/core.t
@@ -1,11 +1,15 @@
#!./perl
BEGIN {
- unshift @INC, 't','../../t';
- require 'test.pl';
- skip_all_without_dynamic_extension('B');
+ require Config;
+ if (($Config::Config{'extensions'} !~ /\bB\b/) ){
+ print "1..0 # Skip -- Perl configured without B module\n";
+ exit 0;
+ }
}
+use strict;
+use Test::More;
# Many functions appear in multiple lists, so that shift() and shift(foo)
# are both tested.
@@ -55,10 +59,6 @@ my @nary = (
[qw( msgrcv open socketpair splice )]
);
-my $tests = @bin + 13;
-$tests += @$_ for @nary;
-plan $tests;
-
use B::Deparse;
my $deparse = new B::Deparse;
@@ -70,7 +70,7 @@ sub CORE_test {
use feature 'switch';
::like
$deparse->coderef2text(
- eval "sub { () = $expr }" or die "$@in $expr"
+ eval "no strict 'vars'; sub { () = $expr }" or die "$@in $expr"
),
qr/\sCORE::$keyword.*;/,
$name||$keyword
@@ -79,7 +79,8 @@ sub CORE_test {
for my $argc(0..$#nary) {
for(@{$nary[$argc]}) {
CORE_test
- $_,
"CORE::$_(" . join(',',map "\$$_", (undef,"a".."z")[1..$argc]) . ")",
+ $_,
+ "CORE::$_(" . join(',',map "\$$_", (undef,"a".."z")[1..$argc]) . ")",
"$_, $argc argument" . "s"x($argc != 1);
}
}
@@ -100,3 +101,5 @@ CORE_test values => 'CORE::values %bar', 'values %hash';
#CORE_test not => 'CORE::not $a, $b', 'not';
CORE_test readline => 'CORE::readline $a.$b', 'readline';
CORE_test readpipe => 'CORE::readpipe $a+$b', 'readpipe';
+
+done_testing();
--
Perl5 Master Repository
-
[perl.git] branch smoke-me/runperl, updated. v5.14.0-302-ga6030d1
by Nicholas Clark