diff options
author | Chris Goldthorpe | 2008-01-22 23:22:52 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2008-01-22 23:22:52 +0000 |
commit | 2dc68b737d98086c6ac6583e14cc3899c095d152 (patch) | |
tree | c8b5a52ff0d57e8b6ec65c7ae5c94af9302095b3 /org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc | |
parent | ecb7f19b6d7027c9bcaab496da5ecc290cab1830 (diff) | |
download | eclipse.platform.ua-2dc68b737d98086c6ac6583e14cc3899c095d152.tar.gz eclipse.platform.ua-2dc68b737d98086c6ac6583e14cc3899c095d152.tar.xz eclipse.platform.ua-2dc68b737d98086c6ac6583e14cc3899c095d152.zip |
Bug 216170 [Help] can't have the helpData.xml in another plugin from the plugin_customization.ini file
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/AllTocTests.java | 3 | ||||
-rw-r--r-- | org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java | 49 |
2 files changed, 51 insertions, 1 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java index f2d62e4a8..f0b039073 100644 --- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,5 +34,6 @@ public class AllTocTests extends TestSuite { addTest(TocLinkChecker.suite()); addTestSuite(TopicFinderTest.class); addTestSuite(TocSortingTest.class); + addTestSuite(HelpData.class); } } diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java new file mode 100644 index 000000000..7810c588d --- /dev/null +++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.ua.tests.help.toc; + +import java.util.List; + +import junit.framework.TestCase; + +import org.eclipse.help.internal.util.ProductPreferences; + +public class HelpData extends TestCase { + + public void testHelpDataInPlugin() { + List result = ProductPreferences.getTocOrdering("org.eclipse.ua.tests", "data/help/toc/helpData.xml", ""); + assertEquals(2, result.size()); + assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0)); + assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1)); + } + + public void testPluginsRoot() { + List result = ProductPreferences.getTocOrdering("org.eclipse.sdk", "PLUGINS_ROOT/org.eclipse.ua.tests/data/help/toc/helpData.xml", ""); + assertEquals(2, result.size()); + assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0)); + assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1)); + } + + public void testHelpDataOverridesBaseTocs() { + List result = ProductPreferences.getTocOrdering("org.eclipse.ua.tests", "data/help/toc/helpData.xml", "org.eclipse.help"); + assertEquals(2, result.size()); + assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0)); + assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1)); + } + + public void testBaseTocs() { + List result = ProductPreferences.getTocOrdering("", "", "/org.eclipse.help/toc.xml,/org.eclipse.test/toc.xml"); + assertEquals(2, result.size()); + assertEquals("/org.eclipse.help/toc.xml", result.get(0)); + assertEquals("/org.eclipse.test/toc.xml", result.get(1)); + } + +} |