" yyy = 10\n" +
" print xxx, yyy\n" +
"";
Document doc = new Document(d);
IModule module = AbstractModule.createModuleFromDoc("", null, doc, nature, true);
ICompletionState emptyCompletionState = CompletionStateFactory.getEmptyCompletionState("xxx", nature,
new CompletionCache());
//look for xxx
Definition[] defs = (Definition[]) module.findDefinition(emptyCompletionState, 6, 16, nature);
assertEquals(1, defs.length);
assertEquals(4, defs[0].line);
assertEquals(9, defs[0].col);
assertSame(module, defs[0].module);
//look for yyy
emptyCompletionState = CompletionStateFactory.getEmptyCompletionState("yyy", nature, new CompletionCache());
defs = (Definition[]) module.findDefinition(emptyCompletionState, 6, 22, nature);
assertEquals(1, defs.length);
assertEquals(5, defs[0].line);
assertEquals(12, defs[0].col);
assertSame(module, defs[0].module);