1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix broken tests.

This commit is contained in:
John Camelon 2005-04-19 20:16:43 +00:00
parent e7d6eed46d
commit e43fccacd1
3 changed files with 8 additions and 4 deletions

View file

@ -810,7 +810,7 @@ public class SearchRegressionTests extends BaseTestFramework implements ICSearch
IFile h = importFile( "FunctionDefinition.h", header ); //$NON-NLS-1$
writer = new StringWriter();
writer.write("#include \"FunctionDeclaration.h\"\n" ); //$NON-NLS-1$
writer.write("#include \"FunctionDefinition.h\"\n" ); //$NON-NLS-1$
writer.write("int f2/*def*/(){return 2;} \n" ); //$NON-NLS-1$
writer.write("void f5/*def*/(){ \n" ); //$NON-NLS-1$
writer.write(" int i = N::f1(); \n" ); //$NON-NLS-1$

View file

@ -2885,7 +2885,7 @@ abstract class BaseScanner implements IScanner {
// if not found by this point, and the inclusion is local, try just the
// path as is (bug 91086)
if( local )
if( local && !include_next )
{
reader = createReader( EMPTY_STRING, filename );
if (reader != null) {

View file

@ -80,8 +80,12 @@ public class ScannerUtility {
*/
public static String createReconciledPath(String path, String fileName) {
//TODO assert pathFile.isDirectory();
StringBuffer newPathBuffer = new StringBuffer( new File(path).getPath() );
newPathBuffer.append( File.separatorChar );
StringBuffer newPathBuffer = new StringBuffer();
if( ! path.equals( "" )) //$NON-NLS-1$
{
newPathBuffer.append( new File(path).getPath() );
newPathBuffer.append( File.separatorChar );
}
newPathBuffer.append( fileName );
//remove ".." and "." segments
return reconcilePath( newPathBuffer.toString() );