** NOT PART OF THE BUILD **
This commit is contained in:
harishd%netscape.com 2001-02-16 17:44:23 +00:00
Родитель 4a3014492e
Коммит 166d2f2d83
4 изменённых файлов: 24 добавлений и 28 удалений

Просмотреть файл

@ -23,7 +23,6 @@
#include "nsParserCIID.h" #include "nsParserCIID.h"
#include "nsIParser.h" #include "nsIParser.h"
#include "nsILoggingSink.h" #include "nsILoggingSink.h"
#include "CNavDTD.h"
#include "nsIInputStream.h" #include "nsIInputStream.h"
#include "prprf.h" #include "prprf.h"
#include <fstream.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(kIParserIID, NS_IPARSER_IID);
static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID); static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID);
static NS_DEFINE_CID(kNavDTDCID, NS_CNAVDTD_CID);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
static void SetupRegistry() static void SetupRegistry()
@ -93,7 +94,7 @@ nsresult ParseData(char* anInputStream,char* anOutputStream) {
if (NS_SUCCEEDED(result)) { if (NS_SUCCEEDED(result)) {
// Create a dtd // Create a dtd
nsCOMPtr<nsIDTD> 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)) { if(NS_SUCCEEDED(result)) {
// Parse the document, having the sink write the data to fp // Parse the document, having the sink write the data to fp
PRFileDesc* out; PRFileDesc* out;

Просмотреть файл

@ -7,28 +7,25 @@
$drive=$`; $drive=$`;
die "\nUsage: perl TestParser.pl [-b|-v|-c] <filelist> die "\nUsage: perl TestParser.pl [-b|-v] <filelist>
b -> creates baseline file(*.b) b -> create baseline
v -> creates verification file (*.v) v -> verify changes\n"
c -> compare baseline vs verification\n"
if(@ARGV < 2 || @ARGV > 2); if(@ARGV < 2 || @ARGV > 2);
open(FILE_LIST,$ARGV[1]) || die "\nCannot open $ARGV[1]\n"; open(FILE_LIST,$ARGV[1]) || die "\nCannot open $ARGV[1]\n";
if($ARGV[0] eq "-b" || $ARGV[0] eq "-v") { if($ARGV[0] eq "-b") {
$ARGV[0]=~s/-//g; # create file extension for the output
foreach $input(<FILE_LIST>) { foreach $input(<FILE_LIST>) {
@output=split(/\./,$input); @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") { elsif($ARGV[0] eq "-v") {
# use windows "fc" to compare files!!! foreach $input(<FILE_LIST>) {
foreach $input(<FILE_LIST>) {
@output=split(/\./,$input); @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 { else {

Просмотреть файл

@ -23,7 +23,6 @@
#include "nsParserCIID.h" #include "nsParserCIID.h"
#include "nsIParser.h" #include "nsIParser.h"
#include "nsILoggingSink.h" #include "nsILoggingSink.h"
#include "CNavDTD.h"
#include "nsIInputStream.h" #include "nsIInputStream.h"
#include "prprf.h" #include "prprf.h"
#include <fstream.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(kIParserIID, NS_IPARSER_IID);
static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID); static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID);
static NS_DEFINE_CID(kNavDTDCID, NS_CNAVDTD_CID);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
static void SetupRegistry() static void SetupRegistry()
@ -93,7 +94,7 @@ nsresult ParseData(char* anInputStream,char* anOutputStream) {
if (NS_SUCCEEDED(result)) { if (NS_SUCCEEDED(result)) {
// Create a dtd // Create a dtd
nsCOMPtr<nsIDTD> 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)) { if(NS_SUCCEEDED(result)) {
// Parse the document, having the sink write the data to fp // Parse the document, having the sink write the data to fp
PRFileDesc* out; PRFileDesc* out;

Просмотреть файл

@ -7,28 +7,25 @@
$drive=$`; $drive=$`;
die "\nUsage: perl TestParser.pl [-b|-v|-c] <filelist> die "\nUsage: perl TestParser.pl [-b|-v] <filelist>
b -> creates baseline file(*.b) b -> create baseline
v -> creates verification file (*.v) v -> verify changes\n"
c -> compare baseline vs verification\n"
if(@ARGV < 2 || @ARGV > 2); if(@ARGV < 2 || @ARGV > 2);
open(FILE_LIST,$ARGV[1]) || die "\nCannot open $ARGV[1]\n"; open(FILE_LIST,$ARGV[1]) || die "\nCannot open $ARGV[1]\n";
if($ARGV[0] eq "-b" || $ARGV[0] eq "-v") { if($ARGV[0] eq "-b") {
$ARGV[0]=~s/-//g; # create file extension for the output
foreach $input(<FILE_LIST>) { foreach $input(<FILE_LIST>) {
@output=split(/\./,$input); @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") { elsif($ARGV[0] eq "-v") {
# use windows "fc" to compare files!!! foreach $input(<FILE_LIST>) {
foreach $input(<FILE_LIST>) {
@output=split(/\./,$input); @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 { else {