1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 23:40:39 -08:00
emacs/mps/qa/test/script/commands/help
Richard Tucker 3cf1e787c4 Add a pointer to guide.mmqa in mm information
Copied from Perforce
 Change: 20598
 ServerID: perforce.ravenbrook.com
1999-03-01 13:55:31 +00:00

53 lines
997 B
Perl

#!/usr/local/perl
# $HopeName: MMQA_harness!script:commands:help(trunk.4) $
#
# provide help on QA functions
#
if (@ARGV) {
foreach (@ARGV) {
&printhelp($_);
}
} else {
opendir(DIR, $script_dir."/help");
print "Help topics:\n";
foreach (readdir(DIR)) {
unless (/^\./) {
&summhelp($_);
}
}
print "For help on a topic, type 'qa help <topic>'.\n\n";
print "For general instructions on how to run tests, see guide.mmqa in\n";
print "the MM Information database.\n";
closedir(DIR);
}
sub summhelp {
local ($infile, $sumline) = @_;
unless(open(IN, $script_dir."/help/".$infile)) {
die "File ".$infile." unexpectedly not found.\n";
}
$sumline = <IN>;
close(IN);
write STDOUT;
}
sub printhelp {
local ($infile) = @_;
unless(open(IN, $script_dir."/help/".$infile)) {
print "No help available on $infile.\n";
} else {
<IN>;
while (<IN>) {
print $_;
}
}
}
format STDOUT =
@<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$infile, $sumline
.