This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In t/lib/common.pl, inline RandomMatch() into its only caller.
authorNicholas Clark <nick@ccl4.org>
Thu, 24 Feb 2011 13:21:48 +0000 (13:21 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 24 Feb 2011 13:22:17 +0000 (13:22 +0000)
t/lib/common.pl

index 5e28fc0..4ed7143 100644 (file)
@@ -182,7 +182,10 @@ for (@prgs){
        $ok = 1;
     }
     elsif ($option_random) {
-        $ok = randomMatch($results, $expected);
+       my @got = sort split "\n", $results;
+       my @expected = sort split "\n", $expected;
+       
+       $ok = "@got" eq "@expected";
     }
     elsif ($option_regex) {
        $ok = $results =~ /^$expected/;
@@ -205,18 +208,6 @@ for (@prgs){
        { rmtree $_ if -d $_ }
 }
 
-sub randomMatch
-{
-    my $got = shift ;
-    my $expected = shift;
-
-    my @got = sort split "\n", $got ;
-    my @expected = sort split "\n", $expected ;
-
-   return "@got" eq "@expected";
-
-}
-
 sub print_err_line {
     my($switch, $prog, $expected, $results, $todo) = @_;
     my $err_line = "PROG: $switch\n$prog\n" .