Permalink
Browse files

This checks for a valid perl6, but it does not honor shebang lines

  • Loading branch information...
1 parent 8151531 commit 5e74ab8ad2b9d1f644ca7f21133856b9de27c2bf @leto leto committed Sep 18, 2009
Showing with 12 additions and 9 deletions.
  1. +9 −0 t/harness
  2. +3 −9 t/{ → perl6}/02-eval.t
View
@@ -12,6 +12,15 @@ my $pbc = 'perl5.pbc';
my @tests = (<t/*.t>,<t/*/*.t>, <t/spec/*/*.t>);
+# Determine if perl6 is in our $PATH
+system("perl6 -e42");
+if ($? == -1 or ($? & 127)) {
+ @tests = grep { $_ !~ /perl6/ } @tests;
+ print "No working perl6 binary found in your path. Perl 6 tests disabled. :(\n";
+} else {
+ print "Found a working perl6 binary in your path. Perl 6 tests enabled. :)\n";
+}
+
our %harness_args = (
language => 'blizkost',
verbosity => 0,
@@ -1,15 +1,9 @@
+#!perl6
# I am not sure how to execute these tests from harness.
-# make test or parrot ./perl5.pir t/02-eval.t or ./blizkost t/02-eval.t
+# perl6 t/02-eval.t should work
+use v6;
use Test;
-BEGIN {
- eval { require v6 };
- if ($@) {
- print "1..1\n";
- print "ok 1 # v6.pm not installed\n";
- exit;
- }
-}
plan 5;
ok 1 == eval( '1', :lang<perl5>), 'eval Integer';

0 comments on commit 5e74ab8

Please sign in to comment.