mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
blinking test fixed
This commit is contained in:
@@ -96,15 +96,21 @@ public class XmlDocumentationTest extends LightPlatformCodeInsightFixtureTestCas
|
||||
String expectedText = StringUtil.convertLineSeparators(VfsUtilCore.loadText(vfile));
|
||||
String text = context.generateDoc();
|
||||
assertNotNull(text);
|
||||
assertEquals(expectedText, StringUtil.convertLineSeparators(text));
|
||||
assertEquals(stripFirstLine(expectedText), stripFirstLine(StringUtil.convertLineSeparators(text)));
|
||||
|
||||
if (completionVariant != null) {
|
||||
vfile = LocalFileSystem.getInstance().findFileByIoFile(new File(getTestDataPath() +baseFileNames[0] + ".expected.completion.html"));
|
||||
expectedText = StringUtil.convertLineSeparators(VfsUtilCore.loadText(vfile), "\n");
|
||||
assertEquals(expectedText, StringUtil.convertLineSeparators(context.generateDocForCompletion(completionVariant), "\n"));
|
||||
assertEquals(stripFirstLine(expectedText), stripFirstLine(StringUtil.convertLineSeparators(context.generateDocForCompletion(completionVariant), "\n")));
|
||||
}
|
||||
}
|
||||
|
||||
// the first line may contain attributes in unpredictable order (after Transform work)
|
||||
private static String stripFirstLine(String text) {
|
||||
if (!text.startsWith("<html ")) return text;
|
||||
return text.substring(text.indexOf('\n'));
|
||||
}
|
||||
|
||||
public void testDtdDoc() throws Exception {
|
||||
doOneTest("dtd.dtd", "foo", false, true, "web-app_2_4.xsd");
|
||||
doOneTest("dtd.xml", "foo", false, true, "web-app_2_4.xsd");
|
||||
|
||||
Reference in New Issue
Block a user