String d = DOC_HEAD + "codelanguage-def[" + name + "]["+ expectedKeywords[0] + "," + expectedKeywords[1] + " , " + expectedKeywords[2] +", " + expectedKeywords[3]+"]\n\nchapter[foo]\n\n";
XdocFile file = getDoc(d);
Document doc = (Document) file.getMainSection();
List<LangDef> defs = doc.getLangDefs();
assertEquals(1, defs.size());
LangDef def = defs.get(0);
assertEquals(name, def.getName());
List<String> keywords = def.getKeywords();
assertEquals(expectedKeywords.length, keywords.size());
for (int i = 0; i < expectedKeywords.length; i++) {
assertEquals(expectedKeywords[i], keywords.get(i));
}
}