1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-18 17:01:01 -08:00
emacs/mps/qa/test/script/useful
Richard Tucker 92eee4e55c New unit
new files

Copied from Perforce
 Change: 20297
 ServerID: perforce.ravenbrook.com
1998-10-28 17:18:29 +00:00

47 lines
781 B
Text

# $HopeName$
# Various subroutines that the MMQA harness finds useful.
#
1;
sub debug {
local ($text) = @_;
if ($DEBUG_INFO eq "on") {
print $text."\n";
}
}
sub mysystem {
local ($command) = @_;
$command =~ s/(\S)\//$1$dirsep/g;
&debug("SYSTEM >>$command<<");
system($command);
}
sub mailfile {
local ($file, $subj) = @_;
if ($MAIL_RESULTS eq "on") {
&$platmailfile($file, $MAIL_TO, $subj);
}
}
#
# comparison of harness version numbers
#
sub vleq {
local ($a, $b, @a, @b) = @_;
@a = split /\./, $a;
@b = split /\./, $b;
while (defined $a[0] && defined $b[0]) {
if ($a[0] == $b[0]) {
shift @a; shift @b;
} else {
return ($a[0] < $b[0]);
}
}
if (! defined $a[0]) { $a[0] = -1 }
if (! defined $b[0]) { $b[0] = -1 }
return ($a[0] <= $b[0]);
}