mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Modified parser test script.
** NOT PART OF THE BUILD **
This commit is contained in:
parent
cef0dff830
commit
bdca09dd7b
@ -23,7 +23,6 @@
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsILoggingSink.h"
|
||||
#include "CNavDTD.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "prprf.h"
|
||||
#include <fstream.h>
|
||||
@ -46,6 +45,8 @@ static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_CID);
|
||||
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
|
||||
static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID);
|
||||
|
||||
static NS_DEFINE_CID(kNavDTDCID, NS_CNAVDTD_CID);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static void SetupRegistry()
|
||||
@ -93,7 +94,7 @@ nsresult ParseData(char* anInputStream,char* anOutputStream) {
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
// Create a dtd
|
||||
nsCOMPtr<nsIDTD> dtd;
|
||||
result=NS_NewNavHTMLDTD(getter_AddRefs(dtd));
|
||||
result=nsComponentManager::CreateInstance(kNavDTDCID,nsnull,NS_GET_IID(nsIDTD),getter_AddRefs(dtd));
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
// Parse the document, having the sink write the data to fp
|
||||
PRFileDesc* out;
|
||||
|
@ -7,28 +7,25 @@
|
||||
|
||||
$drive=$`;
|
||||
|
||||
die "\nUsage: perl TestParser.pl [-b|-v|-c] <filelist>
|
||||
b -> creates baseline file(*.b)
|
||||
v -> creates verification file (*.v)
|
||||
c -> compare baseline vs verification\n"
|
||||
die "\nUsage: perl TestParser.pl [-b|-v] <filelist>
|
||||
b -> create baseline
|
||||
v -> verify changes\n"
|
||||
|
||||
if(@ARGV < 2 || @ARGV > 2);
|
||||
|
||||
open(FILE_LIST,$ARGV[1]) || die "\nCannot open $ARGV[1]\n";
|
||||
|
||||
if($ARGV[0] eq "-b" || $ARGV[0] eq "-v") {
|
||||
$ARGV[0]=~s/-//g; # create file extension for the output
|
||||
|
||||
if($ARGV[0] eq "-b") {
|
||||
foreach $input(<FILE_LIST>) {
|
||||
@output=split(/\./,$input);
|
||||
system("$drive://mozilla//dist//WIN32_D.obj//bin//TestParser.exe $input $output[0].$ARGV[0]");
|
||||
system("$drive://mozilla//dist//WIN32_D.obj//bin//TestParser.exe $input $output[0].b");
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq "-c") {
|
||||
# use windows "fc" to compare files!!!
|
||||
foreach $input(<FILE_LIST>) {
|
||||
elsif($ARGV[0] eq "-v") {
|
||||
foreach $input(<FILE_LIST>) {
|
||||
@output=split(/\./,$input);
|
||||
system("fc $output[0].b $output[0].v");
|
||||
system("$drive://mozilla//dist//WIN32_D.obj//bin//TestParser.exe $input $output[0].v");
|
||||
system("fc $output[0].b $output[0].v");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsILoggingSink.h"
|
||||
#include "CNavDTD.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "prprf.h"
|
||||
#include <fstream.h>
|
||||
@ -46,6 +45,8 @@ static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_CID);
|
||||
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
|
||||
static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID);
|
||||
|
||||
static NS_DEFINE_CID(kNavDTDCID, NS_CNAVDTD_CID);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static void SetupRegistry()
|
||||
@ -93,7 +94,7 @@ nsresult ParseData(char* anInputStream,char* anOutputStream) {
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
// Create a dtd
|
||||
nsCOMPtr<nsIDTD> dtd;
|
||||
result=NS_NewNavHTMLDTD(getter_AddRefs(dtd));
|
||||
result=nsComponentManager::CreateInstance(kNavDTDCID,nsnull,NS_GET_IID(nsIDTD),getter_AddRefs(dtd));
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
// Parse the document, having the sink write the data to fp
|
||||
PRFileDesc* out;
|
||||
|
@ -7,28 +7,25 @@
|
||||
|
||||
$drive=$`;
|
||||
|
||||
die "\nUsage: perl TestParser.pl [-b|-v|-c] <filelist>
|
||||
b -> creates baseline file(*.b)
|
||||
v -> creates verification file (*.v)
|
||||
c -> compare baseline vs verification\n"
|
||||
die "\nUsage: perl TestParser.pl [-b|-v] <filelist>
|
||||
b -> create baseline
|
||||
v -> verify changes\n"
|
||||
|
||||
if(@ARGV < 2 || @ARGV > 2);
|
||||
|
||||
open(FILE_LIST,$ARGV[1]) || die "\nCannot open $ARGV[1]\n";
|
||||
|
||||
if($ARGV[0] eq "-b" || $ARGV[0] eq "-v") {
|
||||
$ARGV[0]=~s/-//g; # create file extension for the output
|
||||
|
||||
if($ARGV[0] eq "-b") {
|
||||
foreach $input(<FILE_LIST>) {
|
||||
@output=split(/\./,$input);
|
||||
system("$drive://mozilla//dist//WIN32_D.obj//bin//TestParser.exe $input $output[0].$ARGV[0]");
|
||||
system("$drive://mozilla//dist//WIN32_D.obj//bin//TestParser.exe $input $output[0].b");
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq "-c") {
|
||||
# use windows "fc" to compare files!!!
|
||||
foreach $input(<FILE_LIST>) {
|
||||
elsif($ARGV[0] eq "-v") {
|
||||
foreach $input(<FILE_LIST>) {
|
||||
@output=split(/\./,$input);
|
||||
system("fc $output[0].b $output[0].v");
|
||||
system("$drive://mozilla//dist//WIN32_D.obj//bin//TestParser.exe $input $output[0].v");
|
||||
system("fc $output[0].b $output[0].v");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user