Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis D'Entremont2006-03-03 16:59:27 +0000
committerCurtis D'Entremont2006-03-03 16:59:27 +0000
commita1334b0681ea79f5b76becdffe1b9ba831681a2c (patch)
treeefee4c384f72dcf33eaf6ae8976ae72ea3e173cc /org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc
parent6d26cabc9dc2d0396062b5006958bc2992586023 (diff)
downloadeclipse.platform.ua-a1334b0681ea79f5b76becdffe1b9ba831681a2c.tar.gz
eclipse.platform.ua-a1334b0681ea79f5b76becdffe1b9ba831681a2c.tar.xz
eclipse.platform.ua-a1334b0681ea79f5b76becdffe1b9ba831681a2c.zip
130337 [Help] TOC file parser should ignore unknown elements / attributesv20060303
Diffstat (limited to 'org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java
index 66e6bbbbd..2bdb831fa 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/ParserTest.java
@@ -58,23 +58,19 @@ public class ParserTest extends TestCase {
TocFile file = toc.getTocFile();
Bundle bundle = UserAssistanceTestPlugin.getDefault().getBundle();
- String pluginRoot = bundle.getLocation().substring("update@".length());
String relativePath = file.getHref();
/*
* Only test what's in the toc test data folder.
*/
if (relativePath.startsWith("data/help/toc/")) {
- String absolutePath = pluginRoot + relativePath;
- String resultFile = FileUtil.getResultFile(absolutePath);
-
try {
- String expected = FileUtil.getContents(bundle, FileUtil.getResultFile(relativePath, true));
+ String expected = FileUtil.getResultFileContents(bundle, relativePath);
String actual = TocModelSerializer.serialize(toc);
- Assert.assertEquals("Serialized toc model for " + relativePath + "did not match the expected result: " + FileUtil.getResultFile(relativePath), expected, actual);
+ Assert.assertEquals("Serialized toc model for " + relativePath + " did not match the expected result", expected, actual);
}
catch(IOException e) {
- Assert.fail("An error occured while loading expected result file for TOC at: " + resultFile + ": " + e);
+ Assert.fail("An error occured while loading expected result file for TOC at: " + relativePath + ": " + e);
}
}
}

Back to the top