diff options
author | Michael G. Schwern <schwern@pobox.com> | 2001-02-17 17:44:44 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-02-18 16:53:46 +0000 |
commit | 5d9a640495c9fba008f523d6f54b66106ead4d0f (patch) | |
tree | dc371c72ec62dcb0732ff02e0aa4a0271a3466e2 /t/TEST | |
parent | a4341a650d4ab04956b1f7ad537e1692aed7ed15 (diff) | |
download | perl-5d9a640495c9fba008f523d6f54b66106ead4d0f.tar.gz |
Re: Why t/TEST and not Test::Harness?
Message-ID: <20010217224444.A6679@magnonel.guild.net>
Replace UTEST with TEST -utf8.
p4raw-id: //depot/perl@8821
Diffstat (limited to 't/TEST')
-rwxr-xr-x | t/TEST | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -1,15 +1,18 @@ #!./perl -# Last change: Fri May 28 03:16:57 BST 1999 - # This is written in a peculiar style, since we're trying to avoid # most of the constructs we'll be testing for. $| = 1; -if ($#ARGV >= 0 && $ARGV[0] eq '-v') { - $verbose = 1; - shift; +# Cheesy version of Getopt::Std. Maybe we should replace it with that. +if ($#ARGV >= 0) { + foreach my $idx (0..$#ARGV) { + next unless $ARGV[$idx] =~ /^-(\w+)$/; + $verbose = 1 if $1 eq 'v'; + $with_utf= 1 if $1 eq 'utf8'; + splice(@ARGV, $idx, 1); + } } chdir 't' if -f 't/TEST'; @@ -86,13 +89,15 @@ EOT $switch = ''; } + my $utf = $with_utf ? '-I../lib -Mutf8' + : ''; if ($type eq 'perl') { - my $run = "./perl$switch $test |"; + my $run = "./perl$switch $utf $test |"; open(RESULTS,$run) or print "can't run '$run': $!.\n"; } else { my $compile = - "./perl -I../lib ../utils/perlcc -o ./$test.plc ./$test " + "./perl -I../lib ../utils/perlcc -o ./$test.plc $utf ./$test " ." && ./$test.plc |"; open(RESULTS, $compile) or print "can't compile '$compile': $!.\n"; |