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:
parent
e7d6eed46d
commit
e43fccacd1
3 changed files with 8 additions and 4 deletions
|
@ -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$
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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() );
|
||||
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() );
|
||||
|
|
Loading…
Add table
Reference in a new issue