From 7d467e20b1e8b26dc5be3c3e7df3cba2d04cac7a Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 24 Feb 2011 13:21:48 +0000 Subject: [PATCH] In t/lib/common.pl, inline RandomMatch() into its only caller. --- t/lib/common.pl | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/t/lib/common.pl b/t/lib/common.pl index 5e28fc0..4ed7143 100644 --- a/t/lib/common.pl +++ b/t/lib/common.pl @@ -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" . -- 2.7.4