xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pauld...@apache.org
Subject cvs commit: xml-xalan/c/Tests/Extensions extensions.cpp
Date Mon, 17 Dec 2001 14:40:26 GMT
pauldick    01/12/17 06:40:26

  Modified:    c/Tests/Extensions extensions.cpp
  Log:
  Check for invalid base directory
  
  Revision  Changes    Path
  1.15      +12 -3     xml-xalan/c/Tests/Extensions/extensions.cpp
  
  Index: extensions.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Extensions/extensions.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- extensions.cpp	2001/12/12 21:26:06	1.14
  +++ extensions.cpp	2001/12/17 14:40:26	1.15
  @@ -124,7 +124,6 @@
   				   const char* test)
   {
   	// Set up the input/output files.
  -
   	const XalanDOMString testName(h.generateFileName(fileName,"out"));
   
   	xsl = h.args.base + currentDir + pathSep + fileName;
  @@ -324,8 +323,18 @@
   	setHelp();	
   	if (h.getParams(argc, argv, "EXTENSION-RESULTS") == true)
   	{
  +		const XalanDOMString	extDir(h.args.base + currentDir);
  +
  +		// Check that the base directory is correct.
  +		if ( !h.checkDir(extDir) )
  +		{
  +			cout << "Invalid base directory - " << c_str(TranscodeToLocalCodePage(extDir))
<< endl;
  +			cout << h.args.help.str();
  +			return 0;
  +		}
  +
   		// Generate Unique Run id. (Only used to name the result logfile.)
  -		const XalanDOMString  UniqRunid = h.generateUniqRunid();
  +		const XalanDOMString	UniqRunid = h.generateUniqRunid();
   
   		// Defined basic constants for file manipulation 
   		const XalanDOMString drive(h.getDrive());
  @@ -350,7 +359,7 @@
   		h.checkAndCreateDir(theOutputDir);
   
   		// Get the files found in the "cextension" directory
  -		const FileNameVectorType	files = h.getTestFileNames(h.args.base, currentDir, false);
  +		const FileNameVectorType	files = h.getTestFileNames(h.args.base, currentDir, true);
   
   		// TestCase1 is used to verify correct functioning of the default extension functions
   		TestCase1(xalan, files[0], logFile);	// Difference function
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message