On Sep-16, Andy Dougherty wrote:
> [charnames.pm is unavailable in 5.00503.]
> 
> Commenting out the 'use charnames' in String.pm, I only get two failures
> for languages/perl6 with perl5.00503.  They are
> ...
> On balance, I wonder if these tests should simply be skipped if $] < 5.6.

Ok, those two tests are now skipped if you're running on a perl that
doesn't support them. Hopefully I did that right; I don't have
anything older than 5.8 installed just now.

I made the following changes, in case anyone can notice a flaw:

Index: P6C/Tree/String.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/Tree/String.pm,v
retrieving revision 1.6
diff -p -u -b -r1.6 String.pm
--- P6C/Tree/String.pm  16 Mar 2003 09:02:08 -0000      1.6
+++ P6C/Tree/String.pm  19 Sep 2003 06:35:26 -0000
@@ -216,7 +216,7 @@ sub string_special {
             error ("Error in interpolation of control-char: $@"),die if $@;
         }
         else {
-            use charnames qw(:full);
+#            use charnames qw(:full);
             # The charnames doesn't seem to propagate into the eval""
             # for me -- sfink
             $val = eval qq[use charnames qw(:full); "\\N{$_}"];
Index: t/compiler/b.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/b.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -p -u -b -r1.3 -r1.4
--- t/compiler/b.t      16 Feb 2003 21:04:42 -0000      1.3
+++ t/compiler/b.t      19 Sep 2003 06:27:45 -0000      1.4
@@ -1,6 +1,7 @@
 #!perl
 use strict;
 use P6C::TestCompiler tests => 6;
+use Test::More;
 
 ##############################
 output_is(<<'CODE', <<'OUT', "string interpolation 1");
@@ -67,6 +68,9 @@ CODE
 OUT
 
 ##############################
+SKIP: {
+skip("running on a perl without charnames", 1)
+    unless eval "use charnames (); 1";
 output_is(<<'CODE', <<'OUT', "string interpolation 4");
 sub main() {
     print "\c[^J]"; # Control-Char
@@ -82,6 +86,7 @@ CODE
 16
 @P
 OUT
+}
 
 ##############################
 output_is(<<'CODE', <<'OUT', "string interpolation 5");
Index: t/compiler/c.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/c.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -p -u -b -r1.1 -r1.2
--- t/compiler/c.t      27 Dec 2002 18:19:02 -0000      1.1
+++ t/compiler/c.t      19 Sep 2003 06:27:45 -0000      1.2
@@ -1,9 +1,13 @@
 #!perl
 use strict;
 use P6C::TestCompiler tests => 6;
+use Test::More;
 
 ##############################
 
+SKIP: {
+skip("running on a perl that does not understand 0b... notation", 1)
+    unless 2 == eval "0b010";
 output_is(<<'CODE', <<'OUT', "Binary");
 sub main() {
        print 0b0110;
@@ -15,6 +19,7 @@ CODE
 6
 -6
 OUT
+}
 
 ##############################
 

Reply via email to