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

Testcase for headers with non-standard file-extension (bug 205778).

This commit is contained in:
Markus Schorn 2007-11-23 09:09:16 +00:00
parent bac56fad6d
commit 6e5eb0ce2a

View file

@ -1175,4 +1175,17 @@ public class IndexBugsTests extends BaseTestCase {
assertEquals(2, refs.length);
}
// int ok;
// #include "header.x"
public void testNonStandardSuffix_Bug205778() throws Exception {
StringBuffer[] contents= getContentsForTest(2);
final IIndexManager indexManager = CCorePlugin.getIndexManager();
TestSourceReader.createFile(fCProject.getProject(), "header.x", contents[0].toString());
TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[1].toString());
indexManager.reindex(fCProject);
waitForIndexer();
IIndexBinding[] bindings= fIndex.findBindings("ok".toCharArray(), IndexFilter.ALL, NPM);
assertEquals(1, bindings.length);
}
}