harishd%netscape.com dca861bd0b ** NOT PART OF THE BUILD **Restoring parser regression testing
git-svn-id: svn://10.0.0.236/trunk@124538 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-02 21:51:42 +00:00

38 lines
957 B
Perl

#! /usr/bin/perl
use Cwd;
die "\nUsage: perl TestParser.pl [-b|-v] <bin-path> <urllist>
b -> create baseline
v -> verify changes
bin-path -> Ex. drive:/mozilla/dist/bin
filelist -> Run ListGen.pl which will yield url_list.txt\n"
if(@ARGV < 3 || @ARGV > 3);
open(FILE_LIST,$ARGV[2]) || die "\nCannot open $ARGV[2]\n";
if($ARGV[0] eq "-b") {
foreach $input(<FILE_LIST>) {
$input =~s/\n//g;
@output=split(/\./,$input);
print "\n$input\n";
system("$ARGV[1]/TestParser.exe $input $output[0].b");
}
}
elsif($ARGV[0] eq "-v") {
foreach $input(<FILE_LIST>) {
$input =~s/\n//g;
@output=split(/\./,$input);
print "\n$input\n";
system("$ARGV[1]/TestParser.exe $input $output[0].v");
system("diff -u $output[0].b $output[0].v");
}
}
else {
print "\n\"$ARGV[0]\" unknown....\n";
print "\nUsage: perl TestParser.pl [-b|-v] <bin-path> <filelist>\n\n";
}
close(FILE_LIST);