This commit was manufactured by cvs2svn to create tag 'R1_5_5'.
diff --git a/features/org.eclipse.wst.web_tests.feature/feature.xml b/features/org.eclipse.wst.web_tests.feature/feature.xml
index 1030300..43f8815 100644
--- a/features/org.eclipse.wst.web_tests.feature/feature.xml
+++ b/features/org.eclipse.wst.web_tests.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.web_tests.feature"
label="%featureName"
- version="2.0.0.qualifier"
+ version="1.5.4.qualifier"
provider-name="%providerName">
<description>
@@ -21,6 +21,11 @@
<update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
</url>
+ <requires>
+ <import feature="org.eclipse.test"/>
+ <import feature="org.eclipse.wst.xml_tests.feature"/>
+ </requires>
+
<plugin
id="org.eclipse.wst.css.core.tests"
download-size="0"
diff --git a/features/org.eclipse.wst.xml_tests.feature/feature.xml b/features/org.eclipse.wst.xml_tests.feature/feature.xml
index 385c9e8..7eee87e 100644
--- a/features/org.eclipse.wst.xml_tests.feature/feature.xml
+++ b/features/org.eclipse.wst.xml_tests.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.xml_tests.feature"
label="%featureName"
- version="2.0.0.qualifier"
+ version="1.5.3.qualifier"
provider-name="%providerName">
<description>
@@ -21,6 +21,11 @@
<update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
</url>
+ <requires>
+ <import feature="org.eclipse.wst.xml_ui.feature"/>
+ <import feature="org.eclipse.test"/>
+ </requires>
+
<plugin
id="org.eclipse.wst.dtd.ui.tests"
download-size="0"
diff --git a/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF
index eda1179..47276d5 100644
--- a/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jst.jsp.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.jst.jsp.core.tests
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.3.qualifier
Bundle-ClassPath: jspcoretests.jar
Bundle-Activator: org.eclipse.jst.jsp.core.tests.JSPCoreTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
@@ -14,9 +14,10 @@
org.eclipse.jst.jsp.core.tests.dom,
org.eclipse.jst.jsp.core.tests.model,
org.eclipse.jst.jsp.core.tests.taglibindex
-Require-Bundle: org.junit;bundle-version="[3.8.0,4.0.0)",
+Require-Bundle: org.junit,
org.eclipse.wst.html.core,
org.eclipse.wst.xml.core,
+ org.eclipse.wst.sse.ui,
org.eclipse.wst.sse.core,
org.eclipse.core.resources,
org.eclipse.core.runtime,
@@ -24,6 +25,5 @@
org.eclipse.wst.css.core,
com.ibm.icu,
org.eclipse.wst.validation,
- org.eclipse.jdt.core,
- org.eclipse.wst.sse.ui
+ org.eclipse.jdt.core
Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/JSPCoreTestSuite.java b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/JSPCoreTestSuite.java
index 18e9eaf..8e5beee 100644
--- a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/JSPCoreTestSuite.java
+++ b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/JSPCoreTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2007 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
@@ -23,6 +23,7 @@
import org.eclipse.jst.jsp.core.tests.source.JSPTokenizerTest;
import org.eclipse.jst.jsp.core.tests.taglibindex.TestIndex;
import org.eclipse.jst.jsp.core.tests.translation.JSPJavaTranslatorCoreTest;
+import org.eclipse.jst.jsp.core.tests.validation.JSPActionValidatorTest;
import org.eclipse.jst.jsp.core.tests.validation.JSPJavaValidatorTest;
import org.eclipse.jst.jsp.css.core.tests.source.JSPedCSSSourceParserTest;
@@ -52,6 +53,7 @@
addTest(new TestSuite(JSPedCSSSourceParserTest.class, "Special Parsing Tests for JSP-CSS content"));
addTest(new TestSuite(JSPJavaValidatorTest.class, "JSP Java Validator Tests"));
addTest(new TestSuite(TestImportedNodes.class, "Imported Nodes Tests"));
+ addTest(new TestSuite(JSPActionValidatorTest.class, "JSP Action Validator Tests"));
}
}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/cleanupformat/FormatTester.java b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/cleanupformat/FormatTester.java
index b226517..fbdb6e2 100644
--- a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/cleanupformat/FormatTester.java
+++ b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/cleanupformat/FormatTester.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004 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
@@ -24,7 +24,7 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.utils.StringUtils;
import org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML;
-import org.eclipse.wst.xml.core.internal.provisional.format.StructuredFormatPreferencesXML;
+import org.eclipse.wst.xml.core.internal.provisional.format.IStructuredFormatPreferencesXML;
public class FormatTester extends TestCase {
private static final boolean PRINT_FAILED_FORMAT_TESTS = false;
@@ -51,7 +51,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -77,7 +77,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -103,7 +103,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -129,7 +129,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -155,7 +155,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -181,7 +181,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -207,7 +207,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -233,7 +233,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -259,7 +259,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -285,7 +285,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -311,7 +311,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -337,7 +337,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(true);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(true);
formatPreferences.setLineWidth(72);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -363,7 +363,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(72);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -389,7 +389,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -415,7 +415,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(999);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -441,7 +441,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(true);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(true);
formatPreferences.setLineWidth(72);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
@@ -467,7 +467,7 @@
// init FormatPreferences
IStructuredFormatPreferences formatPreferences = fHTMLFormatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(false);
formatPreferences.setLineWidth(72);
formatPreferences.setIndent("\t");
formatPreferences.setClearAllBlankLines(false);
diff --git a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/BundleResourceUtil.java b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/BundleResourceUtil.java
index c8d2667..9c8f8e2 100644
--- a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/BundleResourceUtil.java
+++ b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/BundleResourceUtil.java
@@ -31,12 +31,15 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jst.jsp.core.tests.JSPCoreTestsPlugin;
+import org.eclipse.wst.validation.internal.operations.ValidatorManager;
public class BundleResourceUtil {
@@ -82,12 +85,10 @@
}
}
catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ e.printStackTrace(System.err);
}
catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ e.printStackTrace(System.err);
}
}
return file;
@@ -112,6 +113,21 @@
}
};
ResourcesPlugin.getWorkspace().run(runnable, new NullProgressMonitor());
+
+ try {
+ Platform.getJobManager().join(ValidatorManager.VALIDATOR_JOB_FAMILY, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new NullProgressMonitor());
+ }
+ catch (OperationCanceledException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
return file[0];
}
diff --git a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/TestIndex.java b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/TestIndex.java
index 024ee5c..8c95208 100644
--- a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/TestIndex.java
+++ b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/taglibindex/TestIndex.java
@@ -17,18 +17,36 @@
import junit.framework.TestCase;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.core.ClasspathEntry;
+import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
+import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
+import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
+import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
import org.eclipse.jst.jsp.core.taglib.IJarRecord;
import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
import org.eclipse.jst.jsp.core.taglib.IURLRecord;
import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
+import org.eclipse.jst.jsp.core.tests.JSPCoreTestsPlugin;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.validation.internal.operations.ValidatorManager;
+import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
+import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
+import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
+import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
/**
* Tests for the TaglibIndex.
@@ -224,17 +242,51 @@
assertEquals(uri, ((IJarRecord) taglibRecord2).getURI());
}
+ public void test_181057a() throws Exception {
+ boolean doValidateSegments = JSPCorePlugin.getDefault().getPluginPreferences().getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS);
+ String testName = "bug_181057";
+ // Create new project
+ IProject j = BundleResourceUtil.createSimpleProject("j", null, null);
+ assertTrue(j.exists());
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/j" + testName, "/j");
+ IProject k = BundleResourceUtil.createSimpleProject("k", null, null);
+ assertTrue(k.exists());
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/k" + testName, "/k");
+
+ IProject project = BundleResourceUtil.createSimpleProject(testName, Platform.getStateLocation(JSPCoreTestsPlugin.getDefault().getBundle()).append(testName), null);
+ assertTrue(project.exists());
+ JSPCorePlugin.getDefault().getPluginPreferences().setValue(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/" + testName, "/" + testName);
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/struts.jar", "/" + testName + "/struts.jar");
+ project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ project.build(IncrementalProjectBuilder.FULL_BUILD, "org.eclipse.wst.validation.validationbuilder", null, new NullProgressMonitor());
+ Platform.getJobManager().join(ValidatorManager.VALIDATOR_JOB_FAMILY, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new NullProgressMonitor());
+ JSPCorePlugin.getDefault().getPluginPreferences().setValue(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, doValidateSegments);
+ /*
+ * main.jsp contains numerous references to tags in struts.jar, which
+ * is at the end of the build path
+ */
+ IFile main = project.getFile("main.jsp");
+ IMarker[] markers = main.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);
+ StringBuffer s = new StringBuffer();
+ for (int i = 0; i < markers.length; i++) {
+ s.append("\n" + markers[i].getAttribute(IMarker.LINE_NUMBER) + ":" + markers[i].getAttribute(IMarker.MESSAGE));
+ }
+ assertEquals("problem markers found" + s.toString(), 0, markers.length);
+ }
+
/**
* test caching from session-to-session
*/
public void testCaching1() throws Exception {
- TaglibIndex.shutdown();
// Create new project
IProject project = BundleResourceUtil.createSimpleProject("testcache1", null, null);
assertTrue(project.exists());
BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/testcache1", "/testcache1");
BundleResourceUtil.copyBundleEntryIntoWorkspace("/testfiles/bug_118251-sample/sample_tld.jar", "/testcache1/WebContent/WEB-INF/lib/sample_tld.jar");
- TaglibIndex.startup();
ITaglibRecord[] records = TaglibIndex.getAvailableTaglibRecords(new Path("/testcache1/WebContent"));
assertEquals("total ITaglibRecord count doesn't match", 5, records.length);
@@ -309,7 +361,7 @@
assertEquals("ITaglibRecords were found", 0, records.length);
// make sure project 2 sees two taglibs
ITaglibRecord[] records2 = TaglibIndex.getAvailableTaglibRecords(new Path("/testavailable2/WebContent"));
- if(records2.length != 2) {
+ if (records2.length != 2) {
for (int i = 0; i < records2.length; i++) {
System.err.println(records2[i]);
}
@@ -320,8 +372,8 @@
TaglibIndex.startup();
- records2 = TaglibIndex.getAvailableTaglibRecords(new Path("/testavailable2/WebContent"));
- assertEquals("total ITaglibRecord count doesn't match after restart", 2, records2.length);
+ records = TaglibIndex.getAvailableTaglibRecords(new Path("/testavailable2/WebContent"));
+ assertEquals("total ITaglibRecord count doesn't match after restart", 2, records.length);
IJavaProject created = JavaCore.create(project2);
assertTrue("/availabletest2 not a Java project", created.exists());
@@ -373,4 +425,37 @@
records = TaglibIndex.getAvailableTaglibRecords(new Path("/testavailable1/WebContent"));
assertEquals("total ITaglibRecord count doesn't match (after exporting jar and restarting)", 1, records.length);
}
+
+ public void testUtilityProjectSupport() throws Exception {
+ // Create project 1
+ IProject project = BundleResourceUtil.createSimpleProject("test-jar", null, null);
+ assertTrue(project.exists());
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/bug183756/test-jar", "/test-jar");
+
+ // Create project 2
+ IProject project2 = BundleResourceUtil.createSimpleProject("test-war", null, null);
+ assertTrue(project2.exists());
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/bug183756/test-war", "/test-war");
+
+ IFile testFile = project2.getFile(new Path("src/main/webapp/test.jsp"));
+ assertTrue("missing test JSP file!", testFile.isAccessible());
+
+ IDOMModel jspModel = null;
+ try {
+ jspModel = (IDOMModel) StructuredModelManager.getModelManager().getModelForRead(testFile);
+ NodeList tests = jspModel.getDocument().getElementsByTagName("test:test");
+ assertTrue("test:test element not found", tests.getLength() > 0);
+ CMElementDeclaration elementDecl = ModelQueryUtil.getModelQuery(jspModel).getCMElementDeclaration(((Element) tests.item(0)));
+ assertNotNull("No element declaration was found for test:test at runtime", elementDecl);
+ assertTrue("element declaration was not the expected kind", elementDecl instanceof CMNodeWrapper);
+ CMNode originNode = ((CMNodeWrapper) elementDecl).getOriginNode();
+ assertTrue("element declaration was not from a tag library", originNode instanceof TLDElementDeclaration);
+ assertEquals("element declaration was not from expected tag library", "http://foo.com/testtags", ((TLDDocument) ((TLDElementDeclaration) originNode).getOwnerDocument()).getUri());
+ }
+ finally {
+ if (jspModel != null) {
+ jspModel.releaseFromRead();
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/translation/JSPJavaTranslatorCoreTest.java b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/translation/JSPJavaTranslatorCoreTest.java
index 84756f6..4e97d82 100644
--- a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/translation/JSPJavaTranslatorCoreTest.java
+++ b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/translation/JSPJavaTranslatorCoreTest.java
@@ -14,14 +14,24 @@
import junit.framework.TestCase;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapterFactory;
+import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
+import org.eclipse.jst.jsp.core.tests.JSPCoreTestsPlugin;
import org.eclipse.jst.jsp.core.tests.taglibindex.BundleResourceUtil;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.validation.internal.operations.ValidatorManager;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
@@ -65,7 +75,7 @@
IDOMModel jspModel = (IDOMModel) model;
String jspSource = model.getStructuredDocument().get();
-
+
assertTrue("line delimiters have been converted to Windows [CRLF]", jspSource.indexOf("\r\n") < 0);
assertTrue("line delimiters have been converted to Mac [CR]", jspSource.indexOf("\r") < 0);
@@ -83,4 +93,54 @@
model.releaseFromRead();
}
+ public void test_174042() throws Exception {
+ boolean doValidateSegments = JSPCorePlugin.getDefault().getPluginPreferences().getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS);
+ String testName = "bug_174042";
+ // Create new project
+ IProject project = BundleResourceUtil.createSimpleProject(testName, null, null);
+ assertTrue(project.exists());
+ JSPCorePlugin.getDefault().getPluginPreferences().setValue(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/" + testName, "/" + testName);
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/struts.jar", "/" + testName + "/struts.jar");
+ project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ project.build(IncrementalProjectBuilder.FULL_BUILD, "org.eclipse.wst.validation.validationbuilder", null, new NullProgressMonitor());
+ Platform.getJobManager().join(ValidatorManager.VALIDATOR_JOB_FAMILY, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new NullProgressMonitor());
+ JSPCorePlugin.getDefault().getPluginPreferences().setValue(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, doValidateSegments);
+ IFile main = project.getFile("main.jsp");
+ IMarker[] markers = main.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);
+ StringBuffer s = new StringBuffer();
+ for (int i = 0; i < markers.length; i++) {
+ s.append("\n" + markers[i].getAttribute(IMarker.LINE_NUMBER) + ":" + markers[i].getAttribute(IMarker.MESSAGE));
+ }
+ assertEquals("problem markers found" + s.toString(), 0, markers.length);
+ }
+
+ public void test_178443() throws Exception {
+ boolean doValidateSegments = JSPCorePlugin.getDefault().getPluginPreferences().getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS);
+ String testName = "bug_178443";
+ // Create new project
+ IProject project = BundleResourceUtil.createSimpleProject(testName, Platform.getStateLocation(JSPCoreTestsPlugin.getDefault().getBundle()).append(testName), null);
+ assertTrue(project.exists());
+ JSPCorePlugin.getDefault().getPluginPreferences().setValue(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/" + testName, "/" + testName);
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/struts.jar", "/" + testName + "/struts.jar");
+ project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ project.build(IncrementalProjectBuilder.FULL_BUILD, "org.eclipse.wst.validation.validationbuilder", null, new NullProgressMonitor());
+ Platform.getJobManager().join(ValidatorManager.VALIDATOR_JOB_FAMILY, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, new NullProgressMonitor());
+ Platform.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new NullProgressMonitor());
+ JSPCorePlugin.getDefault().getPluginPreferences().setValue(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, doValidateSegments);
+ IFile main = project.getFile("main.jsp");
+ IMarker[] markers = main.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);
+ StringBuffer s = new StringBuffer();
+ for (int i = 0; i < markers.length; i++) {
+ s.append("\n" + markers[i].getAttribute(IMarker.LINE_NUMBER) + ":" + markers[i].getAttribute(IMarker.MESSAGE));
+ }
+ assertEquals("problem markers found" + s.toString(), 0, markers.length);
+ }
+
}
diff --git a/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/validation/JSPActionValidatorTest.java b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/validation/JSPActionValidatorTest.java
new file mode 100644
index 0000000..51c971e
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/src/org/eclipse/jst/jsp/core/tests/validation/JSPActionValidatorTest.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.jst.jsp.core.tests.validation;
+
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.jsp.core.internal.validation.JSPActionValidator;
+import org.eclipse.jst.jsp.core.tests.taglibindex.BundleResourceUtil;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.html.core.internal.HTMLCoreMessages;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class JSPActionValidatorTest extends TestCase {
+ String wtp_autotest_noninteractive = null;
+ private static final String PROJECT_NAME = "testvalidatejspactions";
+ private static final String UNDEFINED_ATTR_IDONT = "idont";
+ private static final String REQUIRED_ATTR_NAME = "name";
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ String noninteractive = System.getProperty("wtp.autotest.noninteractive");
+ if (noninteractive != null)
+ wtp_autotest_noninteractive = noninteractive;
+ System.setProperty("wtp.autotest.noninteractive", "true");
+
+ if (!ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME).exists()) {
+ BundleResourceUtil.createSimpleProject(PROJECT_NAME, null, new String[]{JavaCore.NATURE_ID});
+ BundleResourceUtil.copyBundleEntriesIntoWorkspace("/testfiles/" + PROJECT_NAME, "/" + PROJECT_NAME);
+ }
+ assertTrue("project could not be created", ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME).exists());
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ if (wtp_autotest_noninteractive != null)
+ System.setProperty("wtp.autotest.noninteractive", wtp_autotest_noninteractive);
+ }
+
+ /**
+ * Tests if unknown attributes are detected
+ *
+ * @throws Exception
+ */
+ public void testUknownAttribute() throws Exception {
+ JSPActionValidator validator = new JSPActionValidator();
+ IReporter reporter = new ReporterForTest();
+ ValidationContextForTest helper = new ValidationContextForTest();
+ String filePath = "/" + PROJECT_NAME + "/WebContent/undefinedattribute.jsp";
+ helper.setURI(filePath);
+ validator.validate(helper, reporter);
+
+ boolean foundError1 = errorMessageFound(reporter, NLS.bind(HTMLCoreMessages.Undefined_attribute_name___ERROR_, UNDEFINED_ATTR_IDONT), 4);
+ if (foundError1)
+ foundError1 = errorMessageFound(reporter, NLS.bind(HTMLCoreMessages.Undefined_attribute_name___ERROR_, UNDEFINED_ATTR_IDONT), 12);
+
+ assertTrue("jsp action validator did not detect undefined attributes", foundError1);
+ }
+
+ /**
+ * Tests if missing required attributes are detected
+ *
+ * @throws Exception
+ */
+ public void testMissingRequiredAttribute() throws Exception {
+ JSPActionValidator validator = new JSPActionValidator();
+ IReporter reporter = new ReporterForTest();
+ ValidationContextForTest helper = new ValidationContextForTest();
+ String filePath = "/" + PROJECT_NAME + "/WebContent/norequiredattribute.jsp";
+ helper.setURI(filePath);
+ validator.validate(helper, reporter);
+
+ boolean foundError = errorMessageFound(reporter, NLS.bind(HTMLCoreMessages.Undefined_attribute_name___ERROR_, REQUIRED_ATTR_NAME), 11);
+
+ assertTrue("jsp action validator did not detect missing required attributes", foundError);
+ }
+
+ private boolean errorMessageFound(IReporter reporter, String errorMessage, int errorLineNumber) {
+ boolean foundError = false;
+ List messages = reporter.getMessages();
+ Iterator iter = messages.iterator();
+ while (iter.hasNext() && !foundError) {
+ IMessage message = (IMessage) iter.next();
+ int lineNumber = message.getLineNumber();
+ String messageText = message.getText();
+
+ if (lineNumber == errorLineNumber && messageText.startsWith(errorMessage))
+ foundError = true;
+ }
+ return foundError;
+ }
+
+ /**
+ * Tests if missing required attributes are detected
+ *
+ * @throws Exception
+ */
+ public void testAttributesCorrect() throws Exception {
+ JSPActionValidator validator = new JSPActionValidator();
+ IReporter reporter = new ReporterForTest();
+ ValidationContextForTest helper = new ValidationContextForTest();
+ String filePath = "/" + PROJECT_NAME + "/WebContent/worksfine.jsp";
+ helper.setURI(filePath);
+ validator.validate(helper, reporter);
+
+ assertTrue("jsp action validator found errors when it should not have", reporter.getMessages().isEmpty());
+ }
+}
diff --git a/tests/org.eclipse.jst.jsp.core.tests/test.xml b/tests/org.eclipse.jst.jsp.core.tests/test.xml
index 99c4331..142fad1 100644
--- a/tests/org.eclipse.jst.jsp.core.tests/test.xml
+++ b/tests/org.eclipse.jst.jsp.core.tests/test.xml
@@ -1,115 +1,89 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
- <!-- should be little need to change what's above -->
-
- <property
- name="plugin-name"
- value="org.eclipse.jst.jsp.core.tests" />
- <property
- name="classname"
- value="org.eclipse.jst.jsp.core.tests.JSPCoreTestSuite" />
- <property
- name="testType"
- value="core-test" />
+ <!-- sets the properties plugin-name, and library-file -->
+ <property
+ name="plugin-name"
+ value="org.eclipse.jst.jsp.core.tests" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <!-- should be little need to change what's below -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.jst.jsp.core.tests.*xml" />
+ </delete>
+ </target>
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
+ <ant
+ target="core-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.jst.jsp.core.tests.JSPCoreTestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ <property
+ name="workspace"
+ value="${eclipse-home}/junitworkspace-${plugin-name}" />
+ </ant>
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!-- <delete dir="${workspace}" quiet="true" /> -->
+ </target>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.jst.jsp.core.tests.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.classpath b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.classpath
new file mode 100644
index 0000000..d5aec8f
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Tomcat 5.5.9"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.project b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.project
new file mode 100644
index 0000000..80341f8
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>test-jar</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..167796c
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue Apr 24 11:16:26 BST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.wst.common.component b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..0bb9d17
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="test-jar">
+ <wb-resource deploy-path="/" source-path="/src"/>
+<property name="ear_libraries_processed" value="true"/>
+ </wb-module>
+</project-modules>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.wst.common.project.facet.core.xml b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..fd534a9
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.utility"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.java" version="6.0"/>
+ <installed facet="jst.utility" version="1.0"/>
+</faceted-project>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/META-INF/taglib.tld b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/META-INF/taglib.tld
new file mode 100644
index 0000000..af3a82b
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/META-INF/taglib.tld
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib>
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>test</short-name>
+ <uri>http://foo.com/testtags</uri>
+ <description>Test Tag Library</description>
+
+
+ <tag>
+ <name>test</name>
+ <tag-class>com.foo.TestTag</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ test
+ </description>
+ </tag>
+
+</taglib>
+
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/com/foo/TestTag.class b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/com/foo/TestTag.class
new file mode 100644
index 0000000..a2d7262
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/bin/com/foo/TestTag.class
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/META-INF/taglib.tld b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/META-INF/taglib.tld
new file mode 100644
index 0000000..af3a82b
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/META-INF/taglib.tld
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib>
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>test</short-name>
+ <uri>http://foo.com/testtags</uri>
+ <description>Test Tag Library</description>
+
+
+ <tag>
+ <name>test</name>
+ <tag-class>com.foo.TestTag</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ test
+ </description>
+ </tag>
+
+</taglib>
+
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/com/foo/TestTag.java b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/com/foo/TestTag.java
new file mode 100644
index 0000000..951882c
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-jar/src/com/foo/TestTag.java
@@ -0,0 +1,17 @@
+package com.foo;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.TagSupport;
+
+public class TestTag extends TagSupport {
+
+ public int doStartTag() throws JspException {
+ try {
+ pageContext.getOut().write("TAG WORKED");
+ } catch (Exception e) {
+
+ }
+ return super.doStartTag();
+ }
+
+}
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.classpath b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.classpath
new file mode 100644
index 0000000..edb36ca
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.project b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.project
new file mode 100644
index 0000000..eb59416
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.project
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>test-war</name>
+ <comment></comment>
+ <projects>
+ <project>test-jar</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..84f2b19
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue Apr 24 11:08:40 BST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.jst.common.project.facet.core.prefs b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.jst.common.project.facet.core.prefs
new file mode 100644
index 0000000..43db39a
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.jst.common.project.facet.core.prefs
@@ -0,0 +1,4 @@
+#Tue Apr 24 11:08:46 BST 2007
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.6.0_01/owners=jst.java\:6.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.tomcat.runtimeTarget\:\:Apache\ Tomcat\ v4.1/owners=jst.web\:2.3
+eclipse.preferences.version=1
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.wst.common.component b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..2c1da55
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="test-war">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/test-jar/test-jar">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <property name="context-root" value="test-war"/>
+ <property name="java-output-path" value="build/classes"/>
+<property name="web_app_libraries_processed" value="true"/>
+<property name="ear_libraries_processed" value="true"/>
+ </wb-module>
+</project-modules>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.wst.common.project.facet.core.xml b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..dd3b084
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Apache Tomcat v4.1"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="6.0"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/WEB-INF/web.xml b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..47cea3c
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app id="WebApp_ID">
+ <display-name>test-war</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/test.jsp b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/test.jsp
new file mode 100644
index 0000000..38c2e60
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug183756/test-war/src/main/webapp/test.jsp
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://foo.com/testtags" prefix="test" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Test</title>
+</head>
+<body>
+Before Tag
+<test:test/>
+After Tag
+</body>
+</html>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/.classpath b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/.classpath
similarity index 61%
rename from tests/org.eclipse.wst.xml.catalog.tests/.classpath
rename to tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/.classpath
index 751c8f2..653c912 100644
--- a/tests/org.eclipse.wst.xml.catalog.tests/.classpath
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/.classpath
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="struts.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/.project b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/.project
new file mode 100644
index 0000000..1db7a00
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/.project
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bug_174042</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/bin/.keepme b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/bin/.keepme
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/bin/.keepme
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/includeme.jspf b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/includeme.jspf
new file mode 100644
index 0000000..3b19a68
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/includeme.jspf
@@ -0,0 +1,8 @@
+<%@ taglib prefix="logic" uri="http://jakarta.apache.org/struts/tags-logic"%>
+<%! int alpha = 5; %>
+<%@ taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-bean"%>
+<logic:iterate id="iterator">
+<%= iterator %>
+</logic:iterate>
+<bean:define id="id3" type="com.nitin.TestBean"></bean:define>
+<% %>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/main.jsp b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/main.jsp
new file mode 100644
index 0000000..999da48
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_174042/main.jsp
@@ -0,0 +1,6 @@
+<%@ include file="includeme.jspf"%>
+<logic:iterate id="iterator2">
+ <%=iterator2 + "A"%>
+
+ <%= id3 + alpha %>
+</logic:iterate>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/.classpath b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/.classpath
similarity index 61%
copy from tests/org.eclipse.wst.xml.catalog.tests/.classpath
copy to tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/.classpath
index 751c8f2..653c912 100644
--- a/tests/org.eclipse.wst.xml.catalog.tests/.classpath
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/.classpath
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="struts.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/.project b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/.project
new file mode 100644
index 0000000..30509bf
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/.project
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bug_178443</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/bin/.keepme b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/bin/.keepme
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/bin/.keepme
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/includeme.jspf b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/includeme.jspf
new file mode 100644
index 0000000..3b19a68
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/includeme.jspf
@@ -0,0 +1,8 @@
+<%@ taglib prefix="logic" uri="http://jakarta.apache.org/struts/tags-logic"%>
+<%! int alpha = 5; %>
+<%@ taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-bean"%>
+<logic:iterate id="iterator">
+<%= iterator %>
+</logic:iterate>
+<bean:define id="id3" type="com.nitin.TestBean"></bean:define>
+<% %>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/main.jsp b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/main.jsp
new file mode 100644
index 0000000..999da48
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_178443/main.jsp
@@ -0,0 +1,6 @@
+<%@ include file="includeme.jspf"%>
+<logic:iterate id="iterator2">
+ <%=iterator2 + "A"%>
+
+ <%= id3 + alpha %>
+</logic:iterate>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/.classpath b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/.classpath
new file mode 100644
index 0000000..fecd086
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry combineaccessrules="false" kind="src" path="/j"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/k"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="struts.jar"/>
+</classpath>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/.project b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/.project
new file mode 100644
index 0000000..30509bf
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/.project
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bug_178443</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/main.jsp b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/main.jsp
new file mode 100644
index 0000000..04937c0
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/bug_181057/main.jsp
@@ -0,0 +1,14 @@
+<%@ taglib prefix="logic" uri="http://jakarta.apache.org/struts/tags-logic"%>
+<%! int alpha = 5; %>
+<%@ taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-bean"%>
+<logic:iterate id="iterator">
+<%= iterator %>
+</logic:iterate>
+<bean:define id="id3" type="com.nitin.TestBean"></bean:define>
+<% %>
+
+<logic:iterate id="iterator2">
+ <%=iterator2 + "A"%>
+
+ <%= id3 + alpha %>
+</logic:iterate>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/j/.classpath b/tests/org.eclipse.jst.jsp.core.tests/testfiles/j/.classpath
new file mode 100644
index 0000000..233be1d
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/j/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path=""/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/j/.project b/tests/org.eclipse.jst.jsp.core.tests/testfiles/j/.project
new file mode 100644
index 0000000..63bc5f5
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/j/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>j</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/k/.classpath b/tests/org.eclipse.jst.jsp.core.tests/testfiles/k/.classpath
new file mode 100644
index 0000000..233be1d
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/k/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path=""/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/k/.project b/tests/org.eclipse.jst.jsp.core.tests/testfiles/k/.project
new file mode 100644
index 0000000..304ac0b
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/k/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>k</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/struts.jar b/tests/org.eclipse.jst.jsp.core.tests/testfiles/struts.jar
new file mode 100644
index 0000000..db32f9f
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/struts.jar
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/WEB-INF/tld/libtags.tld b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/WEB-INF/tld/libtags.tld
new file mode 100644
index 0000000..fac0b7f
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/WEB-INF/tld/libtags.tld
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
+<taglib>
+ <tlibversion>1.2</tlibversion>
+ <jspversion>1.1</jspversion>
+ <shortname>libtags</shortname>
+ <uri>http://nothing.com/libtags</uri>
+ <tag>
+ <name>ihaveattrs</name>
+ <tagclass>nothing.taglib.ihaveattrs</tagclass>
+ <bodycontent>JSP</bodycontent>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ </attribute>
+ </tag>
+ <tag>
+ <name>ireqattrs</name>
+ <tagclass>nothing.taglib.ireqattrs</tagclass>
+ <bodycontent>JSP</bodycontent>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ </attribute>
+ </tag>
+ <tag>
+ <name>emptyme</name>
+ <tagclass>nothing.taglib.emptyme</tagclass>
+ <bodycontent>JSP</bodycontent>
+ </tag>
+</taglib>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/norequiredattribute.jsp b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/norequiredattribute.jsp
new file mode 100644
index 0000000..7ff9890
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/norequiredattribute.jsp
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://nothing.com/libtags" prefix="libtags"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<libtags:ireqattrs></libtags:ireqattrs>
+</body>
+</html>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/undefinedattribute.jsp b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/undefinedattribute.jsp
new file mode 100644
index 0000000..bd7700b
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/undefinedattribute.jsp
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://nothing.com/libtags" prefix="libtags"%>
+<%@ page idont="work" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<libtags:emptyme idont="work"></libtags:emptyme>
+</body>
+</html>
diff --git a/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/worksfine.jsp b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/worksfine.jsp
new file mode 100644
index 0000000..547d4ba
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.core.tests/testfiles/testvalidatejspactions/WebContent/worksfine.jsp
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://nothing.com/libtags" prefix="libtags"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<libtags:emptyme></libtags:emptyme>
+<libtags:ireqattrs name="<%= "named"%>" scope="<%= "expression" %>"></libtags:ireqattrs>
+<libtags:ihaveattrs name="boo"></libtags:ihaveattrs>
+</body>
+</html>
diff --git a/tests/org.eclipse.jst.jsp.tests.encoding/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.jsp.tests.encoding/META-INF/MANIFEST.MF
index 38f2dbb..61275fe 100644
--- a/tests/org.eclipse.jst.jsp.tests.encoding/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jst.jsp.tests.encoding/META-INF/MANIFEST.MF
@@ -13,7 +13,7 @@
org.eclipse.core.runtime,
org.eclipse.jst.jsp.core,
org.eclipse.wst.xml.core,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.tests.encoding
Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.jst.jsp.tests.encoding/test.xml b/tests/org.eclipse.jst.jsp.tests.encoding/test.xml
index 8ed692e..7cc97da 100644
--- a/tests/org.eclipse.jst.jsp.tests.encoding/test.xml
+++ b/tests/org.eclipse.jst.jsp.tests.encoding/test.xml
@@ -1,97 +1,73 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
name="testsuite"
default="run"
basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
- <!-- should be little need to change what's above -->
-
- <property
+ <!-- Configurable Properties -->
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
+
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
+
+ <!-- sets the properties plugin-name, and library-file -->
+ <property
name="plugin-name"
value="org.eclipse.jst.jsp.tests.encoding" />
- <property
- name="classname"
- value="org.eclipse.jst.jsp.tests.encoding.JSPEncodingTestSuite" />
- <property
- name="testType"
- value="ui-test" />
-
- <!-- should be little need to change what's below -->
-
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
-
-
<property
name="library-file"
value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
+
<!-- This target holds all initialization code that needs to be done for -->
<!-- all tests that are to be run. Initialization for individual tests -->
<!-- should be done within the body of the suite target. -->
-
<target name="init">
- <tstamp />
<delete>
<fileset
dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
+ includes="org.eclipse.jst.jsp.tests.encoding.*xml" />
</delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
</target>
<!-- This target defines the tests that need to be run. -->
<target name="suite">
-
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
<ant
- target="${testType}"
+ target="core-test"
antfile="${library-file}"
dir="${eclipse-home}">
<property
name="data-dir"
- value="${workspace}" />
+ value="${wst-folder}" />
<property
name="plugin-name"
- value="${plugin-name}" />
+ value="org.eclipse.jst.jsp.tests.encoding" />
<property
name="classname"
- value="${classname}" />
+ value="org.eclipse.jst.jsp.tests.encoding.JSPEncodingTestSuite" />
<property
name="plugin-path"
value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
+ <property
+ name="workspace"
+ value="${eclipse-home}/junitworkspace-${plugin-name}" />
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
+ </ant>
</target>
<!-- This target holds code to cleanup the testing environment after -->
<!-- after all of the tests have been run. You can use this target to -->
<!-- delete temporary files that have been created. -->
<target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
<!--<delete dir="${workspace}" quiet="true" />-->
</target>
@@ -106,11 +82,12 @@
dir="${eclipse-home}">
<property
name="includes"
- value="${plugin-name}.*xml" />
+ value="org.eclipse.jst.jsp.tests.encoding.*xml" />
<property
name="output-file"
value="${plugin-name}.xml" />
</ant>
+ <!--<emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
</target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.jsp.ui.tests/META-INF/MANIFEST.MF
index d6526f6..76ca07d 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jst.jsp.ui.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.jst.jsp.ui.tests; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-ClassPath: jspuitests.jar
Bundle-Activator: org.eclipse.jst.jsp.ui.tests.JSPUITestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
@@ -30,7 +30,7 @@
org.eclipse.core.resources,
org.eclipse.jdt.core,
org.eclipse.jst.jsp.ui,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
org.eclipse.wst.xml.core,
org.eclipse.wst.sse.core,
org.eclipse.wst.sse.ui,
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/rem_all_co.gif b/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/rem_all_co.gif
deleted file mode 100644
index ecd1be5..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/rem_all_co.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/resume_co.gif b/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/resume_co.gif
deleted file mode 100644
index 8652797..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/resume_co.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/suspend_co.gif b/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/suspend_co.gif
deleted file mode 100644
index e47777b..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/dlcl16/suspend_co.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/rem_all_co.gif b/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/rem_all_co.gif
deleted file mode 100644
index 28a3785..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/rem_all_co.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/resume_co.gif b/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/resume_co.gif
deleted file mode 100644
index 16f4e25..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/resume_co.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/suspend_co.gif b/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/suspend_co.gif
deleted file mode 100644
index 161e3f5..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/icons/full/elcl16/suspend_co.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/plugin.properties b/tests/org.eclipse.jst.jsp.ui.tests/plugin.properties
index 1b75292..645b414 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/plugin.properties
+++ b/tests/org.eclipse.jst.jsp.ui.tests/plugin.properties
@@ -1,5 +1,4 @@
# properties file for org.eclipse.jst.jsp.ui.tests
Bundle-Vendor.0 = Eclipse.org
Bundle-Name.0 = Structured Source Editor for JSP Tests
-view.name.0 = Embedded JSP Structured Text Viewer
-taglibview.name.0=TaglibIndex Delta Trace View
\ No newline at end of file
+view.name.0 = Embedded JSP Structured Text Viewer
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/plugin.xml b/tests/org.eclipse.jst.jsp.ui.tests/plugin.xml
index 6ac3a4b..4e05633 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/plugin.xml
+++ b/tests/org.eclipse.jst.jsp.ui.tests/plugin.xml
@@ -9,12 +9,6 @@
category="org.eclipse.wst.sse.ui.tests"
class="org.eclipse.jst.jsp.ui.tests.viewer.ViewerTestJSP"
id="org.eclipse.jst.jsp.ui.tests.viewer.ViewerTestJSP" />
- <view
- name="%taglibview.name.0"
- icon="$nl$/icons/sourceEditor.gif"
- category="org.eclipse.wst.sse.ui.tests"
- class="org.eclipse.jst.jsp.ui.tests.TaglibIndexDeltaTraceView"
- id="org.eclipse.jst.jsp.ui.tests.TaglibIndexDeltaTraceView" />
</extension>
</plugin>
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/JSPUITestImages.java b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/JSPUITestImages.java
deleted file mode 100644
index 64e1eb1..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/JSPUITestImages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jst.jsp.ui.tests;
-
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public final class JSPUITestImages {
- private final static String ICONS_PATH = "icons/full/"; //$NON-NLS-1$
-
- /* disabled */
- private final static String DLCL = ICONS_PATH + "dlcl16/"; // $NON-NLS-1$
- /* enabled */
- private final static String ELCL = ICONS_PATH + "elcl16/"; //$NON-NLS-1$
-
- // Images courtesy of org.eclipse.debug.ui
- public static final String IMG_ELCL_SUSPEND = ELCL + "SUSPEND"; //$NON-NLS-1$
- public static final String IMG_ELCL_RESUME = ELCL + "RESUME"; //$NON-NLS-1$
- public static final String IMG_DLCL_SUSPEND = DLCL + "SUSPEND"; //$NON-NLS-1$
- public static final String IMG_DLCL_RESUME = DLCL + "RESUME"; //$NON-NLS-1$
- public static final String IMG_ELCL_REMOVE_ALL = ELCL + "CLEAR"; //$NON-NLS-1$
- public static final String IMG_DLCL_REMOVE_ALL = DLCL + "CLEAR"; //$NON-NLS-1$
-
- static void initializeImageRegistry(ImageRegistry reg) {
- reg.put(IMG_ELCL_RESUME, AbstractUIPlugin.imageDescriptorFromPlugin(JSPUITestsPlugin.ID, ELCL + "resume_co.gif"));
- reg.put(IMG_DLCL_RESUME, AbstractUIPlugin.imageDescriptorFromPlugin(JSPUITestsPlugin.ID, DLCL + "resume_co.gif"));
-
- reg.put(IMG_ELCL_SUSPEND, AbstractUIPlugin.imageDescriptorFromPlugin(JSPUITestsPlugin.ID, ELCL + "suspend_co.gif"));
- reg.put(IMG_DLCL_SUSPEND, AbstractUIPlugin.imageDescriptorFromPlugin(JSPUITestsPlugin.ID, DLCL + "suspend_co.gif"));
-
- reg.put(IMG_ELCL_REMOVE_ALL, AbstractUIPlugin.imageDescriptorFromPlugin(JSPUITestsPlugin.ID, ELCL + "rem_all_co.gif"));
- reg.put(IMG_DLCL_REMOVE_ALL, AbstractUIPlugin.imageDescriptorFromPlugin(JSPUITestsPlugin.ID, DLCL + "rem_all_co.gif"));
- }
-}
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/JSPUITestsPlugin.java b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/JSPUITestsPlugin.java
index 5969fac..5ec1b64 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/JSPUITestsPlugin.java
+++ b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/JSPUITestsPlugin.java
@@ -18,20 +18,19 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.Plugin;
/**
* The main plugin class to be used in the desktop.
*/
-public class JSPUITestsPlugin extends AbstractUIPlugin {
+public class JSPUITestsPlugin extends Plugin {
//The shared instance.
private static JSPUITestsPlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
public static final String ID = "org.eclipse.jst.jsp.ui.tests";
- /**
+ /**
* The constructor.
*/
public JSPUITestsPlugin() {
@@ -94,9 +93,4 @@
File result = new File(location);
return result;
}
-
- protected void initializeImageRegistry(ImageRegistry reg) {
- super.initializeImageRegistry(reg);
- JSPUITestImages.initializeImageRegistry(reg);
- }
}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/TaglibIndexDeltaTraceView.java b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/TaglibIndexDeltaTraceView.java
deleted file mode 100644
index e6ea06b..0000000
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/TaglibIndexDeltaTraceView.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jst.jsp.ui.tests;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.jsp.core.taglib.ITaglibIndexDelta;
-import org.eclipse.jst.jsp.core.taglib.ITaglibIndexListener;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndexDelta;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Sash;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-public class TaglibIndexDeltaTraceView extends ViewPart {
-
- static final String MEM_LISTENING = "IS_LISTENING";
- boolean isListening = false;
-
- /**
- * Resumes listening to TaglibIndexDeltas
- */
- private class ResumeAction extends Action {
- public ResumeAction() {
- super();
- setText("Resume");
- setImageDescriptor(JSPUITestsPlugin.getDefault().getImageRegistry().getDescriptor(JSPUITestImages.IMG_ELCL_RESUME));
- setDisabledImageDescriptor(JSPUITestsPlugin.getDefault().getImageRegistry().getDescriptor(JSPUITestImages.IMG_DLCL_RESUME));
- }
-
- public void run() {
- super.run();
- TaglibIndex.addTaglibIndexListener(fInternalListener);
- isListening = true;
- fSuspendAction.setEnabled(true);
- setEnabled(false);
- }
- }
-
- /**
- * Stops listening to TaglibIndexDeltas
- */
- private class SuspendAction extends Action {
- public SuspendAction() {
- setText("Suspend");
- setImageDescriptor(JSPUITestsPlugin.getDefault().getImageRegistry().getDescriptor(JSPUITestImages.IMG_ELCL_SUSPEND));
- setDisabledImageDescriptor(JSPUITestsPlugin.getDefault().getImageRegistry().getDescriptor(JSPUITestImages.IMG_DLCL_SUSPEND));
- }
-
- public void run() {
- super.run();
- TaglibIndex.removeTaglibIndexListener(fInternalListener);
- isListening = false;
- setEnabled(false);
- fResumeAction.setEnabled(true);
- }
- }
-
- /**
- * Empties deltas from viewer
- */
- private class ClearAction extends Action {
- public ClearAction() {
- setText("Clear");
- setImageDescriptor(JSPUITestsPlugin.getDefault().getImageRegistry().getDescriptor(JSPUITestImages.IMG_ELCL_REMOVE_ALL));
- setDisabledImageDescriptor(JSPUITestsPlugin.getDefault().getImageRegistry().getDescriptor(JSPUITestImages.IMG_DLCL_REMOVE_ALL));
- }
-
- public void run() {
- super.run();
- fInput.clear();
- fViewer.refresh();
- setEnabled(false);
- }
- }
-
- class TaglibIndexListener implements ITaglibIndexListener {
- public void indexChanged(final ITaglibIndexDelta delta) {
- getControl().getDisplay().syncExec(new Runnable() {
- public void run() {
- fInput.add(delta);
- fViewer.refresh();
- fViewer.setSelection(new StructuredSelection(delta));
- fClearAction.setEnabled(true);
- }
- });
- }
- }
-
- ITaglibIndexListener fInternalListener = null;
-
- List fInput = new ArrayList();
- TableViewer fViewer = null;
- ResumeAction fResumeAction;
- SuspendAction fSuspendAction;
- IAction fClearAction;
-
- public TaglibIndexDeltaTraceView() {
- super();
- fInternalListener = new TaglibIndexListener();
- }
-
- void showSelectionDetail(final Composite composite) {
- IStructuredSelection selection = (IStructuredSelection) fViewer.getSelection();
- if (!selection.isEmpty()) {
- final TaglibIndexDelta selectedDelta = (TaglibIndexDelta) selection.getFirstElement();
- final ITableLabelProvider tableLabelProvider = ((ITableLabelProvider) fViewer.getLabelProvider());
- String columnText = tableLabelProvider.getColumnText(selectedDelta, 1);
- columnText = columnText + ":" + tableLabelProvider.getColumnText(selectedDelta, 2);
- new Dialog(composite.getShell()) {
- public void create() {
- setShellStyle(getShellStyle() | SWT.RESIZE);
- super.create();
- }
-
- protected Control createDialogArea(final Composite parent) {
- final Composite inner = new Composite(parent, SWT.NONE);
- inner.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- final Sash sash = new Sash(inner, SWT.HORIZONTAL);
-
- final TreeViewer treeViewer = new TreeViewer(inner);
- treeViewer.setContentProvider(new ITreeContentProvider() {
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0;
- }
-
- public Object getParent(Object element) {
- return selectedDelta;
- }
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof TaglibIndexDelta) {
- TaglibIndexDelta taglibIndexDelta = ((TaglibIndexDelta) parentElement);
- if (taglibIndexDelta.getTrigger() != null) {
- List combined = new ArrayList();
- combined.add(taglibIndexDelta.getTrigger());
- combined.addAll(Arrays.asList(taglibIndexDelta.getAffectedChildren()));
- return combined.toArray();
- }
- return taglibIndexDelta.getAffectedChildren();
- }
- return new Object[0];
- }
- });
- treeViewer.setLabelProvider(new LabelProvider() {
- public String getText(Object element) {
- if (element instanceof ITaglibIndexDelta) {
- ITaglibIndexDelta taglibIndexDelta = ((ITaglibIndexDelta) element);
- if (taglibIndexDelta.getTaglibRecord() != null)
- return taglibIndexDelta.toString();
- String text = tableLabelProvider.getColumnText(selectedDelta, 1);
- text = text + ":" + tableLabelProvider.getColumnText(selectedDelta, 2);
- return text;
- }
- return StringUtils.firstLineOf(super.getText(element));
- }
- });
- treeViewer.setInput(selectedDelta);
-
- final Text text = new Text(inner, SWT.MULTI);
-
- treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection2 = (IStructuredSelection) treeViewer.getSelection();
- if (!selection2.isEmpty())
- text.setText("" + (selection2).getFirstElement());
- else
- text.setText("");
- }
- });
-
- final FormLayout form = new FormLayout();
- inner.setLayout(form);
-
- FormData firstData = new FormData();
- firstData.top = new FormAttachment(0, 0);
- firstData.bottom = new FormAttachment(sash, 2);
- firstData.left = new FormAttachment(0, 0);
- firstData.right = new FormAttachment(100, 0);
- treeViewer.getControl().setLayoutData(firstData);
-
- FormData secondData = new FormData();
- secondData.top = new FormAttachment(sash, 2);
- secondData.left = new FormAttachment(0, 0);
- secondData.right = new FormAttachment(100, 0);
- secondData.bottom = new FormAttachment(100, 0);
- text.setLayoutData(secondData);
-
- final FormData sashData = new FormData();
- sashData.top = new FormAttachment(60, 0);
- sashData.left = new FormAttachment(0, 0);
- sashData.right = new FormAttachment(100, 0);
- sash.setLayoutData(sashData);
- sash.addListener(SWT.Selection, new org.eclipse.swt.widgets.Listener() {
- public void handleEvent(Event e) {
- sashData.top = new FormAttachment(0, e.y);
- inner.layout();
- }
- });
- return sash;
- }
- }.open();
- }
- }
-
- public void createPartControl(final Composite parent) {
- fViewer = new TableViewer(parent, SWT.SINGLE | SWT.FULL_SELECTION);
- fViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- showSelectionDetail(parent);
- }
-
- });
- fViewer.setContentProvider(new ArrayContentProvider());
- fViewer.setLabelProvider(new ITableLabelProvider() {
- public void removeListener(ILabelProviderListener listener) {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void dispose() {
- }
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public String getColumnText(Object element, int columnIndex) {
- switch (columnIndex) {
- case 0 : {
- return Long.toString(((TaglibIndexDelta) element).getTime());
- }
- case 1 : {
- String kind = null;
- switch (((ITaglibIndexDelta) element).getKind()) {
- case ITaglibIndexDelta.ADDED :
- kind = "added";
- break;
- case ITaglibIndexDelta.REMOVED :
- kind = "removed";
- break;
- case ITaglibIndexDelta.CHANGED :
- kind = "changed";
- break;
- }
- return kind;
- }
- case 2 :
- return ((ITaglibIndexDelta) element).getProject().getName();
- case 3 :
- return ((TaglibIndexDelta) element).getTrigger().toString();
- }
- return "";
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- });
-
- String[] columnProperties = new String[]{"time", "Kind", "Project", "Trigger"};
- TableLayout tlayout = new TableLayout();
- CellEditor[] cellEditors = new CellEditor[columnProperties.length];
- int columnWidths[] = new int[]{Display.getCurrent().getBounds().width / 14, Display.getCurrent().getBounds().width / 7, Display.getCurrent().getBounds().width / 7, Display.getCurrent().getBounds().width / 14, Display.getCurrent().getBounds().width / 7};
- for (int i = 0; i < columnProperties.length; i++) {
- tlayout.addColumnData(new ColumnWeightData(1));
- TableColumn tc = new TableColumn(fViewer.getTable(), SWT.NONE);
- tc.setText(columnProperties[i]);
- tc.setResizable(true);
- tc.setWidth(columnWidths[i]);
- }
- fViewer.setCellEditors(cellEditors);
- fViewer.setColumnProperties(columnProperties);
-
- fViewer.getTable().setHeaderVisible(true);
- fViewer.getTable().setLinesVisible(true);
- fViewer.setColumnProperties(columnProperties);
-
- MenuManager contextMenuManager = new MenuManager();
- contextMenuManager.setRemoveAllWhenShown(false);
- contextMenuManager.add(new Action() {
- public void run() {
- super.run();
- showSelectionDetail(parent);
- }
-
- public String getText() {
- return "Details...";
- }
-
- public boolean isEnabled() {
- return !fViewer.getSelection().isEmpty();
- }
- });
-
- Menu contextMenu = contextMenuManager.createContextMenu(fViewer.getControl());
- getControl().setMenu(contextMenu);
-
- fViewer.setInput(fInput);
- }
-
- public void dispose() {
- super.dispose();
- TaglibIndex.removeTaglibIndexListener(fInternalListener);
- }
-
- Control getControl() {
- return fViewer.getControl();
- }
-
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- super.init(site, memento);
-
- boolean shouldListen = memento != null && Boolean.valueOf(memento.getString(MEM_LISTENING)).booleanValue();
- if (shouldListen) {
- TaglibIndex.addTaglibIndexListener(fInternalListener);
- isListening = true;
- }
- fResumeAction = new ResumeAction();
- fSuspendAction = new SuspendAction();
- fClearAction = new ClearAction();
- fSuspendAction.setEnabled(isListening);
- fResumeAction.setEnabled(!isListening);
-
- IToolBarManager mgr = site.getActionBars().getToolBarManager();
- mgr.add(fResumeAction);
- mgr.add(fSuspendAction);
- mgr.add(fClearAction);
- }
-
- public void saveState(IMemento memento) {
- super.saveState(memento);
- memento.putString(MEM_LISTENING, Boolean.toString(isListening));
- }
-
- public void setFocus() {
- fViewer.getControl().setFocus();
- }
-}
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/JSPTranslationTest.java b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/JSPTranslationTest.java
index d37a574..b890f33 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/JSPTranslationTest.java
+++ b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/JSPTranslationTest.java
@@ -14,6 +14,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
+import java.util.Iterator;
import junit.framework.TestCase;
@@ -21,22 +22,38 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
import org.eclipse.jface.text.Position;
import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapterFactory;
+import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
import org.eclipse.jst.jsp.ui.tests.other.ScannerUnitTests;
import org.eclipse.jst.jsp.ui.tests.util.FileUtil;
import org.eclipse.jst.jsp.ui.tests.util.ProjectUnzipUtility;
+import org.eclipse.jst.jsp.ui.tests.util.ProjectUtil;
import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.utils.StringUtils;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
/**
@@ -76,6 +93,77 @@
fProjUtil.initJavaProject("INCLUDES_TESTS");
}
+ public void testPageDirectiveSessionVariableInFile() throws JavaModelException {
+ String jspTestFilePathString = "INCLUDES_TESTS/test189924.jsp";
+ ProjectUtil.copyBundleEntryIntoWorkspace("/testfiles/189924/test189924.jsp", jspTestFilePathString);
+ IPath jspTestFilePath = new Path(jspTestFilePathString);
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(jspTestFilePath);
+
+ verifyTranslationHasNoSessionFieldsOrVariables(file);
+ }
+ private void verifyTranslationHasNoSessionFieldsOrVariables(IFile file) throws JavaModelException {
+ IDOMModel model = null;
+ try {
+ model = (IDOMModel) getStructuredModelForRead(file);
+ setupAdapterFactory(model);
+
+ JSPTranslationAdapter adapter = (JSPTranslationAdapter) model.getDocument().getAdapterFor(IJSPTranslation.class);
+ ICompilationUnit cu = adapter.getJSPTranslation().getCompilationUnit();
+ cu.makeConsistent(new NullProgressMonitor());
+ IType[] types = cu.getAllTypes();
+ for (int i = 0; i < types.length; i++) {
+ IJavaElement[] members = types[i].getChildren();
+ for (int k = 0; k < members.length; k++) {
+ // check fields for name "session"
+ if (members[k].getElementType() == IJavaElement.FIELD) {
+ assertFalse("field named \"session\" exists", members[k].getElementName().equals(JSP11Namespace.ATTR_NAME_SESSION));
+ }
+ /*
+ * check "public void
+ * _jspService(javax.servlet.http.HttpServletRequest
+ * request, javax.servlet.http.HttpServletResponse
+ * response)" for local variables named "session"
+ */
+ else if (members[k].getElementType() == IJavaElement.METHOD && members[k].getElementName().startsWith("_jspService")) {
+ ICompilationUnit compilationUnit = ((IMethod) members[k]).getCompilationUnit();
+ compilationUnit.makeConsistent(new NullProgressMonitor());
+ ASTParser parser = ASTParser.newParser(AST.JLS3);
+ parser.setSource(cu);
+ ASTNode node = parser.createAST(null);
+ node.accept(new ASTVisitor() {
+ public boolean visit(VariableDeclarationStatement node) {
+ Iterator fragments = node.fragments().iterator();
+ while (fragments.hasNext()) {
+ VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.next();
+ if (fragment.getName().getFullyQualifiedName().equals(JSP11Namespace.ATTR_NAME_SESSION)) {
+ String typeName = ((SimpleType) node.getType()).getName().getFullyQualifiedName();
+ assertFalse("local variable of type \"javax.servlet.http.HttpSession\" and named \"session\" exists", typeName.equals("javax.servlet.http.HttpSession"));
+ }
+ }
+ return super.visit(node);
+ }
+ });
+ }
+ }
+ }
+ }
+ finally {
+ if (model != null)
+ model.releaseFromRead();
+ }
+ }
+
+ public void testPageDirectiveSessionVariableInSegment() throws JavaModelException {
+ String jspTestFilePathString = "INCLUDES_TESTS/test189924.jsp";
+ ProjectUtil.copyBundleEntryIntoWorkspace("/testfiles/189924/test189924.jsp", jspTestFilePathString);
+ jspTestFilePathString = "INCLUDES_TESTS/includer.jsp";
+ ProjectUtil.copyBundleEntryIntoWorkspace("/testfiles/189924/includer.jsp", jspTestFilePathString);
+ IPath jspTestFilePath = new Path(jspTestFilePathString);
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(jspTestFilePath);
+
+ verifyTranslationHasNoSessionFieldsOrVariables(file);
+ }
+
public void testTranslatePositions() {
IDOMModel model = getIncludeTestModelForRead();
@@ -128,6 +216,11 @@
String text = translation.getJavaText();
assertNotNull("JSP translation text:", text);
+ // adjust for line delimiters
+ knownTranslationText = StringUtils.replace(knownTranslationText, "\r\n", "\n");
+ knownTranslationText = StringUtils.replace(knownTranslationText, "\r", "\n");
+ text = StringUtils.replace(text, "\r\n", "\n");
+ text = StringUtils.replace(text, "\r", "\n");
assertEquals("JSP translation text does not match expected", knownTranslationText, text);
}
finally {
@@ -196,6 +289,11 @@
InputStream in = getClass().getResourceAsStream("translated_xml_jsp.bin");
String knownTranslationText = loadChars(in);
+ // adjust for line delimiters
+ knownTranslationText = StringUtils.replace(knownTranslationText, "\r\n", "\n");
+ knownTranslationText = StringUtils.replace(knownTranslationText, "\r", "\n");
+ javaText = StringUtils.replace(javaText, "\r\n", "\n");
+ javaText = StringUtils.replace(javaText, "\r", "\n");
assertEquals(knownTranslationText, javaText);
}
finally {
@@ -243,7 +341,12 @@
InputStream in = getClass().getResourceAsStream("translated_xml_jsp_cdata.bin");
String knownText = loadChars(in);
- assertEquals(knownText, transText);
+ // adjust for line delimiters
+ knownText = StringUtils.replace(knownText, "\r\n", "\n");
+ knownText = StringUtils.replace(knownText, "\r", "\n");
+ transText = StringUtils.replace(transText, "\r\n", "\n");
+ transText = StringUtils.replace(transText, "\r", "\n");
+ assertEquals(transText, knownText);
}
finally {
if(sModel != null)
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_text.bin b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_text.bin
index 09e105d..27a10c2 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_text.bin
+++ b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_text.bin
@@ -1,35 +1,35 @@
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.servlet.jsp.*;
-
-public class __2F_INCLUDES_TESTS_2F_jsp_include_test_2E_jsp extends javax.servlet.http.HttpServlet{
- String argh = "argh";
-
- public String globalIncludedString = "included";
-
- protected String with_space = "withspace";
-
-public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- throws java.io.IOException, javax.servlet.ServletException {
-javax.servlet.jsp.PageContext pageContext = null;
-javax.servlet.http.HttpSession session = null;
-javax.servlet.ServletContext application = null;
-javax.servlet.ServletConfig config = null;
-javax.servlet.jsp.JspWriter out = null;
-Object page = null;
-
-try {
- String localIncludedString = globalIncludedString;
-for(int i=0; i<5; i++) {
-out.print(""+
-i
-);
-}
-javax.swing.JButton BEAN_includedBean = new javax.swing.JButton();
- int include_include_int = 5;
-javax.swing.JButton includesUseBean = new javax.swing.JButton();
-out.print(""+
-
-);
- } catch (java.lang.Exception e) {}
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.jsp.*;
+
+public class __2F_INCLUDES_TESTS_2F_jsp_include_test_2E_jsp extends javax.servlet.http.HttpServlet{
+ String argh = "argh";
+
+ public String globalIncludedString = "included";
+
+ protected String with_space = "withspace";
+
+public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
+ throws java.io.IOException, javax.servlet.ServletException {
+javax.servlet.jsp.PageContext pageContext = null;
+javax.servlet.ServletContext application = null;
+javax.servlet.ServletConfig config = null;
+javax.servlet.jsp.JspWriter out = null;
+Object page = null;
+javax.servlet.http.HttpSession session = null;
+
+try {
+ String localIncludedString = globalIncludedString;
+for(int i=0; i<5; i++) {
+out.print(""+
+i
+);
+}
+javax.swing.JButton BEAN_includedBean = new javax.swing.JButton();
+ int include_include_int = 5;
+javax.swing.JButton includesUseBean = new javax.swing.JButton();
+out.print(""+
+
+);
+ } catch (java.lang.Exception e) {}
}}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp.bin b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp.bin
index 4e46230..57e1cd2 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp.bin
+++ b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp.bin
@@ -1,33 +1,33 @@
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.servlet.jsp.*;
-
-import java.util.List;
-public class __2F_INCLUDES_TESTS_2F_xml_2D_jsp_2F_most_2D_tags_2D_xml_2D_jsp_2E_jsp extends javax.servlet.http.HttpServlet{
-public String myFunc() { return "myfunc"; }
-
-public String myFunc2() { return "myfunc"; }
-
-public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- throws java.io.IOException, javax.servlet.ServletException {
-javax.servlet.jsp.PageContext pageContext = null;
-javax.servlet.http.HttpSession session = null;
-javax.servlet.ServletContext application = null;
-javax.servlet.ServletConfig config = null;
-javax.servlet.jsp.JspWriter out = null;
-Object page = null;
-
-try {
-String consec1 = "test";
-String consec2 = "two";
-out.print(""+
-myFunc()
-);
-out.print(""+
-myFunc2()
-);
-javax.swing.AbstractButton jb = new javax.swing.JButton();
-String includedString = "incd";
- jb.
- } catch (java.lang.Exception e) {}
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.jsp.*;
+
+import java.util.List;
+public class __2F_INCLUDES_TESTS_2F_xml_2D_jsp_2F_most_2D_tags_2D_xml_2D_jsp_2E_jsp extends javax.servlet.http.HttpServlet{
+public String myFunc() { return "myfunc"; }
+
+public String myFunc2() { return "myfunc"; }
+
+public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
+ throws java.io.IOException, javax.servlet.ServletException {
+javax.servlet.jsp.PageContext pageContext = null;
+javax.servlet.ServletContext application = null;
+javax.servlet.ServletConfig config = null;
+javax.servlet.jsp.JspWriter out = null;
+Object page = null;
+javax.servlet.http.HttpSession session = null;
+
+try {
+String consec1 = "test";
+String consec2 = "two";
+out.print(""+
+myFunc()
+);
+out.print(""+
+myFunc2()
+);
+javax.swing.AbstractButton jb = new javax.swing.JButton();
+String includedString = "incd";
+ jb.
+ } catch (java.lang.Exception e) {}
}}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp_cdata.bin b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp_cdata.bin
index e045acc..63345ce 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp_cdata.bin
+++ b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/contentassist/translated_xml_jsp_cdata.bin
@@ -1,37 +1,37 @@
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.servlet.jsp.*;
-
-public class __2F_INCLUDES_TESTS_2F_cdata_2F_cdata_2E_jsp extends javax.servlet.http.HttpServlet{
-public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- throws java.io.IOException, javax.servlet.ServletException {
-javax.servlet.jsp.PageContext pageContext = null;
-javax.servlet.http.HttpSession session = null;
-javax.servlet.ServletContext application = null;
-javax.servlet.ServletConfig config = null;
-javax.servlet.jsp.JspWriter out = null;
-Object page = null;
-
-try {
-
-int a = 1;
-if (a
-<
- 2) {
- out.println("x");
-}
-
-String test = "";
-
-
-
-int a = 1;
-if (a < 2) {
- out.println("x");
-}
-
-
-
- test.toUpperCase();
- } catch (java.lang.Exception e) {}
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.servlet.jsp.*;
+
+public class __2F_INCLUDES_TESTS_2F_cdata_2F_cdata_2E_jsp extends javax.servlet.http.HttpServlet{
+public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
+ throws java.io.IOException, javax.servlet.ServletException {
+javax.servlet.jsp.PageContext pageContext = null;
+javax.servlet.ServletContext application = null;
+javax.servlet.ServletConfig config = null;
+javax.servlet.jsp.JspWriter out = null;
+Object page = null;
+javax.servlet.http.HttpSession session = null;
+
+try {
+
+int a = 1;
+if (a
+<
+ 2) {
+ out.println("x");
+}
+
+String test = "";
+
+
+
+int a = 1;
+if (a < 2) {
+ out.println("x");
+}
+
+
+
+ test.toUpperCase();
+ } catch (java.lang.Exception e) {}
}}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/validation/JSPHTMLValidatorTest.java b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/validation/JSPHTMLValidatorTest.java
index f678005..01b331d 100644
--- a/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/validation/JSPHTMLValidatorTest.java
+++ b/tests/org.eclipse.jst.jsp.ui.tests/src/org/eclipse/jst/jsp/ui/tests/validation/JSPHTMLValidatorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006 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
@@ -14,8 +14,8 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;
import org.eclipse.jst.jsp.ui.tests.util.ProjectUtil;
+import org.eclipse.wst.html.internal.validation.HTMLValidator;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
@@ -51,7 +51,7 @@
* @throws Exception
*/
public void testJSPinAttributes() throws Exception {
- JSPContentValidator validator = new JSPContentValidator();
+ HTMLValidator validator = new HTMLValidator();
IReporter reporter = new ReporterForTest();
ValidationContextForTest helper = new ValidationContextForTest();
String filePath = "/" + PROJECT_NAME + "/WebContent/usejspinattribute.jsp";
@@ -67,7 +67,7 @@
* @throws Exception
*/
public void testJSPinAttributesHTML() throws Exception {
- JSPContentValidator validator = new JSPContentValidator();
+ HTMLValidator validator = new HTMLValidator();
IReporter reporter = new ReporterForTest();
ValidationContextForTest helper = new ValidationContextForTest();
String filePath = "/" + PROJECT_NAME + "/WebContent/usejspinattribute.html";
@@ -83,7 +83,7 @@
* @throws Exception
*/
public void testBadAttributeName() throws Exception {
- JSPContentValidator validator = new JSPContentValidator();
+ HTMLValidator validator = new HTMLValidator();
IReporter reporter = new ReporterForTest();
ValidationContextForTest helper = new ValidationContextForTest();
String filePath = "/" + PROJECT_NAME + "/WebContent/badattributenames.jsp";
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/testfiles/189924/includer.jsp b/tests/org.eclipse.jst.jsp.ui.tests/testfiles/189924/includer.jsp
new file mode 100644
index 0000000..48e305a
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.ui.tests/testfiles/189924/includer.jsp
@@ -0,0 +1,2 @@
+
+<%@include file="test189924.jsp" %>
diff --git a/tests/org.eclipse.jst.jsp.ui.tests/testfiles/189924/test189924.jsp b/tests/org.eclipse.jst.jsp.ui.tests/testfiles/189924/test189924.jsp
new file mode 100644
index 0000000..7752c38
--- /dev/null
+++ b/tests/org.eclipse.jst.jsp.ui.tests/testfiles/189924/test189924.jsp
@@ -0,0 +1,3 @@
+
+<%@page session = "false" %>
+
diff --git a/tests/org.eclipse.wst.css.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.css.core.tests/META-INF/MANIFEST.MF
index 1e6341a..227732f 100644
--- a/tests/org.eclipse.wst.css.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.css.core.tests/META-INF/MANIFEST.MF
@@ -2,22 +2,20 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.wst.css.core.tests
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-ClassPath: csscoretests.jar
Bundle-Activator: org.eclipse.wst.css.core.tests.CSSCoreTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Export-Package: org.eclipse.wst.css.core.tests,
- org.eclipse.wst.css.core.tests.format,
- org.eclipse.wst.css.core.tests.format.testfiles,
org.eclipse.wst.css.core.tests.model,
org.eclipse.wst.css.core.tests.source,
org.eclipse.wst.css.core.tests.testfiles,
org.eclipse.wst.css.core.tests.testfiles.results,
org.eclipse.wst.css.core.tests.util
Require-Bundle: org.eclipse.wst.css.core,
+ org.junit,
org.eclipse.wst.sse.core,
org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.junit
+ org.eclipse.core.resources
Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/CSSAllTests.java b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/CSSAllTests.java
index 821570c..4046b8e 100644
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/CSSAllTests.java
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/CSSAllTests.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2004 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
@@ -11,8 +11,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.wst.css.core.tests.format.TestCleanupProcessorCSS;
-import org.eclipse.wst.css.core.tests.format.TestFormatProcessorCSS;
+import org.eclipse.wst.css.core.tests.model.BUG73990SelectorFormatTest;
import org.eclipse.wst.css.core.tests.model.CSSCharsetRuleTest;
import org.eclipse.wst.css.core.tests.model.CSSFontFaceRuleTest;
import org.eclipse.wst.css.core.tests.model.CSSImportRuleTest;
@@ -52,7 +51,6 @@
suite.addTestSuite(CSSMediaRuleTest.class);
suite.addTestSuite(CSSPageRuleTest.class);
suite.addTestSuite(CSSFontFaceRuleTest.class);
- suite.addTestSuite(TestFormatProcessorCSS.class);
- suite.addTestSuite(TestCleanupProcessorCSS.class);
+ suite.addTestSuite(BUG73990SelectorFormatTest.class);
}
}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestCleanupProcessorCSS.java b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestCleanupProcessorCSS.java
deleted file mode 100644
index a6c75b7..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestCleanupProcessorCSS.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.wst.css.core.tests.format;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategyImpl;
-import org.eclipse.wst.css.core.internal.cleanup.CleanupProcessorCSS;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.tests.util.StringCompareUtil;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-public class TestCleanupProcessorCSS extends TestCase {
- private static final String UTF_8 = "UTF-8";
- private StringCompareUtil fStringCompareUtil;
- private CleanupProcessorCSS fCleanupProcessor;
-
- private boolean fOldClearBlankLinesPref;
- private int fOldMaxLineWidthPref;
- private String fOldIndentationCharPref;
- private int fOldIndentationSizePref;
-
- protected void setUp() throws Exception {
- // set up preferences
- Preferences prefs = CSSCorePlugin.getDefault().getPluginPreferences();
- fOldClearBlankLinesPref = prefs.getBoolean(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES);
- fOldMaxLineWidthPref = prefs.getInt(CSSCorePreferenceNames.LINE_WIDTH);
- fOldIndentationCharPref = prefs.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- fOldIndentationSizePref = prefs.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- prefs.setValue(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES, false);
- prefs.setValue(CSSCorePreferenceNames.LINE_WIDTH, 72);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_CHAR, CSSCorePreferenceNames.TAB);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_SIZE, 1);
-
- fCleanupProcessor = new CleanupProcessorCSS();
- fStringCompareUtil = new StringCompareUtil();
- }
-
- protected void tearDown() throws Exception {
- // restore old preferences
- Preferences prefs = CSSCorePlugin.getDefault().getPluginPreferences();
- prefs.setValue(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES, fOldClearBlankLinesPref);
- prefs.setValue(CSSCorePreferenceNames.LINE_WIDTH, fOldMaxLineWidthPref);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_CHAR, fOldIndentationCharPref);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_SIZE, fOldIndentationSizePref);
- }
-
- /**
- * must release model (from edit) after
- *
- * @param filename
- * relative to this class (TestCleanupProcessorCSS)
- */
- private IStructuredModel getModelForEdit(final String filename) {
-
- IStructuredModel model = null;
- try {
- IModelManager modelManager = StructuredModelManager.getModelManager();
- InputStream inStream = getClass().getResourceAsStream(filename);
- if (inStream == null)
- throw new FileNotFoundException("Can't file resource stream " + filename);
- final String baseFile = getClass().getResource(filename).toString();
- model = modelManager.getModelForEdit(baseFile, inStream, null);
- }
- catch (IOException ex) {
- ex.printStackTrace();
- }
- return model;
- }
-
- private void cleanupAndAssertEquals(String beforePath, String afterPath) throws UnsupportedEncodingException, IOException, CoreException {
- IStructuredModel beforeModel = null, afterModel = null;
- try {
- beforeModel = getModelForEdit(beforePath);
- assertNotNull("could not retrieve structured model for : " + beforePath, beforeModel);
-
- afterModel = getModelForEdit(afterPath);
- assertNotNull("could not retrieve structured model for : " + afterPath, afterModel);
-
- fCleanupProcessor.cleanupModel(beforeModel);
-
- ByteArrayOutputStream cleanedupBytes = new ByteArrayOutputStream();
- beforeModel.save(cleanedupBytes); // "beforeModel" should now be
- // after the cleanup processor
-
- ByteArrayOutputStream afterBytes = new ByteArrayOutputStream();
- afterModel.save(afterBytes);
-
- String cleanedupContents = new String(afterBytes.toByteArray(), UTF_8);
- String expectedContents = new String(cleanedupBytes.toByteArray(), UTF_8);
- assertTrue("Cleanup document differs from the expected", fStringCompareUtil.equalsIgnoreLineSeperator(cleanedupContents, expectedContents));
- }
- finally {
- if (beforeModel != null)
- beforeModel.releaseFromEdit();
- if (afterModel != null)
- afterModel.releaseFromEdit();
- }
- }
-
- public void testBUG166909urlCaseCleanup() throws UnsupportedEncodingException, IOException, CoreException {
- // set up cleanup preferences for this test
- CSSCleanupStrategy currentStrategy = CSSCleanupStrategyImpl.getInstance();
- short oldCaseIdentifier = currentStrategy.getIdentCase();
- short oldCasePropertyName = currentStrategy.getPropNameCase();
- short oldCasePropertyValue = currentStrategy.getPropValueCase();
- short oldCaseSelector = currentStrategy.getSelectorTagCase();
- boolean oldFormatSource = currentStrategy.isFormatSource();
- boolean oldFormatQuote = currentStrategy.isQuoteValues();
-
- currentStrategy.setIdentCase(CSSCleanupStrategy.LOWER);
- currentStrategy.setPropNameCase(CSSCleanupStrategy.LOWER);
- currentStrategy.setPropValueCase(CSSCleanupStrategy.LOWER);
- currentStrategy.setSelectorTagCase(CSSCleanupStrategy.LOWER);
- currentStrategy.setFormatSource(true);
- currentStrategy.setQuoteValues(false);
-
- cleanupAndAssertEquals("testfiles/bug166909-urlcase.css", "testfiles/bug166909-urlcase-cleaned.css");
-
- currentStrategy.setIdentCase(oldCaseIdentifier);
- currentStrategy.setPropNameCase(oldCasePropertyName);
- currentStrategy.setPropValueCase(oldCasePropertyValue);
- currentStrategy.setSelectorTagCase(oldCaseSelector);
- currentStrategy.setFormatSource(oldFormatSource);
- currentStrategy.setQuoteValues(oldFormatQuote);
- }
-}
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestFormatProcessorCSS.java b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestFormatProcessorCSS.java
deleted file mode 100644
index 112fdf6..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/TestFormatProcessorCSS.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.wst.css.core.tests.format;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.format.FormatProcessorCSS;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.tests.util.StringCompareUtil;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-public class TestFormatProcessorCSS extends TestCase {
- private static final String UTF_8 = "UTF-8";
- private StringCompareUtil fStringCompareUtil;
- private FormatProcessorCSS formatProcessor;
-
- private boolean fOldClearBlankLinesPref;
- private int fOldMaxLineWidthPref;
- private String fOldIndentationCharPref;
- private int fOldIndentationSizePref;
-
- public TestFormatProcessorCSS(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- // set up preferences
- Preferences prefs = CSSCorePlugin.getDefault().getPluginPreferences();
- fOldClearBlankLinesPref = prefs.getBoolean(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES);
- fOldMaxLineWidthPref = prefs.getInt(CSSCorePreferenceNames.LINE_WIDTH);
- fOldIndentationCharPref = prefs.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- fOldIndentationSizePref = prefs.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- prefs.setValue(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES, false);
- prefs.setValue(CSSCorePreferenceNames.LINE_WIDTH, 72);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_CHAR, CSSCorePreferenceNames.TAB);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_SIZE, 1);
-
- formatProcessor = new FormatProcessorCSS();
- fStringCompareUtil = new StringCompareUtil();
- }
-
- protected void tearDown() throws Exception {
- // restore old preferences
- Preferences prefs = CSSCorePlugin.getDefault().getPluginPreferences();
- prefs.setValue(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES, fOldClearBlankLinesPref);
- prefs.setValue(CSSCorePreferenceNames.LINE_WIDTH, fOldMaxLineWidthPref);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_CHAR, fOldIndentationCharPref);
- prefs.setValue(CSSCorePreferenceNames.INDENTATION_SIZE, fOldIndentationSizePref);
- }
-
- /**
- * must release model (from edit) after
- *
- * @param filename
- * relative to this class (TestFormatProcessorCSS)
- */
- private IStructuredModel getModelForEdit(final String filename) {
-
- IStructuredModel model = null;
- try {
- IModelManager modelManager = StructuredModelManager.getModelManager();
- InputStream inStream = getClass().getResourceAsStream(filename);
- if (inStream == null)
- throw new FileNotFoundException("Can't file resource stream " + filename);
- final String baseFile = getClass().getResource(filename).toString();
- model = modelManager.getModelForEdit(baseFile, inStream, null);
- }
- catch (IOException ex) {
- ex.printStackTrace();
- }
- return model;
- }
-
- private void formatAndAssertEquals(String beforePath, String afterPath) throws UnsupportedEncodingException, IOException, CoreException {
- IStructuredModel beforeModel = null, afterModel = null;
- try {
- beforeModel = getModelForEdit(beforePath);
- assertNotNull("could not retrieve structured model for : " + beforePath, beforeModel);
-
- afterModel = getModelForEdit(afterPath);
- assertNotNull("could not retrieve structured model for : " + afterPath, afterModel);
-
- formatProcessor.formatModel(beforeModel);
-
- ByteArrayOutputStream formattedBytes = new ByteArrayOutputStream();
- beforeModel.save(formattedBytes); // "beforeModel" should now be
- // after the formatter
-
- ByteArrayOutputStream afterBytes = new ByteArrayOutputStream();
- afterModel.save(afterBytes);
-
- String formattedContents = new String(afterBytes.toByteArray(), UTF_8);
- String expectedContents = new String(formattedBytes.toByteArray(), UTF_8);
- assertTrue("Formatted document differs from the expected", fStringCompareUtil.equalsIgnoreLineSeperator(formattedContents, expectedContents));
- }
- finally {
- if (beforeModel != null)
- beforeModel.releaseFromEdit();
- if (afterModel != null)
- afterModel.releaseFromEdit();
- }
- }
-
- public void testBUG73990SelectorFormat() throws UnsupportedEncodingException, IOException, CoreException {
- formatAndAssertEquals("testfiles/BUG73990_selector_unformatted.css", "testfiles/BUG73990_selector_formatted.css");
- }
-
- /**
- * Tests case when format would incorrectly add extra semicolons.
- *
- * @throws UnsupportedEncodingException
- * @throws IOException
- * @throws CoreException
- */
- public void testBUG111569extraSemicolonFormat() throws UnsupportedEncodingException, IOException, CoreException {
- formatAndAssertEquals("testfiles/bug111569-extrasemicolon.css", "testfiles/bug111569-extrasemicolon-formatted.css");
- }
-
- /**
- * Tests case when format would incorrectly add space between selector and
- * attribute selectors <code>input[type="hidden"]</code> would be
- * wrongly formatted as<code>input [type="hidden"]</code> instead of
- * being left alone.
- *
- * @throws UnsupportedEncodingException
- * @throws IOException
- * @throws CoreException
- */
- public void testBUG146198attributeSpecifierFormat() throws UnsupportedEncodingException, IOException, CoreException {
- formatAndAssertEquals("testfiles/bug146198-attributespecifier.css", "testfiles/bug146198-attributespecifier-formatted.css");
- }
-
- public void testBUG110539multipleClassFormat() throws UnsupportedEncodingException, IOException, CoreException {
- formatAndAssertEquals("testfiles/bug110539-multipleclass.css", "testfiles/bug110539-multipleclass-formatted.css");
- }
-}
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug110539-multipleclass-formatted.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug110539-multipleclass-formatted.css
deleted file mode 100644
index 537e7b5..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug110539-multipleclass-formatted.css
+++ /dev/null
@@ -1,19 +0,0 @@
-/* 2 separate classes - yes space */
-.classOne .classTwo {
- color: red;
-}
-
-/* multiple classes - no space */
-.classOne.classTwo {
- color: lime;
-}
-
-/* id and class - yes space */
-#myid .myclass {
- border-top: 0px;
-}
-
-/* id with class - no space */
-#myid.myclass {
- border-top: 0px;
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug110539-multipleclass.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug110539-multipleclass.css
deleted file mode 100644
index fe5073f..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug110539-multipleclass.css
+++ /dev/null
@@ -1,19 +0,0 @@
-/* 2 separate classes - yes space */
-.classOne .classTwo {
-color: red;
-}
-
-/* multiple classes - no space */
-.classOne.classTwo {
-color: lime;
-}
-
-/* id and class - yes space */
-#myid .myclass {
-border-top: 0px;
-}
-
-/* id with class - no space */
-#myid.myclass {
-border-top: 0px;
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug111569-extrasemicolon-formatted.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug111569-extrasemicolon-formatted.css
deleted file mode 100644
index c66e6e9..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug111569-extrasemicolon-formatted.css
+++ /dev/null
@@ -1,8 +0,0 @@
-.sitemaplev1 {
- font-family: Verdana;
- font-size: 12px;
- line-height: 17px;
- color: #666666;
- font-weight: bold;
- text-decoration: none;
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug111569-extrasemicolon.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug111569-extrasemicolon.css
deleted file mode 100644
index c8e307d..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug111569-extrasemicolon.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.sitemaplev1{font-family:Verdana;font-size:12px;line-height:17px;
-color:#666666;font-weight:bold;
-text-decoration:none;}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug146198-attributespecifier-formatted.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug146198-attributespecifier-formatted.css
deleted file mode 100644
index 55ad1ca..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug146198-attributespecifier-formatted.css
+++ /dev/null
@@ -1,3 +0,0 @@
-input[type="hidden"] {
- width: 98%;
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug146198-attributespecifier.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug146198-attributespecifier.css
deleted file mode 100644
index 72c1dbd..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug146198-attributespecifier.css
+++ /dev/null
@@ -1,3 +0,0 @@
-input[type="hidden"] {
-width: 98%;
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug166909-urlcase-cleaned.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug166909-urlcase-cleaned.css
deleted file mode 100644
index 60dea46..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug166909-urlcase-cleaned.css
+++ /dev/null
@@ -1,3 +0,0 @@
-#demo {
- background: url(mixedCase/projectLogo.gif);
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug166909-urlcase.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug166909-urlcase.css
deleted file mode 100644
index dfd0aaa..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/bug166909-urlcase.css
+++ /dev/null
@@ -1,3 +0,0 @@
-#demo {
- background: URL(mixedCase/projectLogo.gif);
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/model/BUG73990SelectorFormatTest.java b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/model/BUG73990SelectorFormatTest.java
new file mode 100644
index 0000000..bec24c6
--- /dev/null
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/model/BUG73990SelectorFormatTest.java
@@ -0,0 +1,28 @@
+package org.eclipse.wst.css.core.tests.model;
+
+import java.io.IOException;
+
+import org.eclipse.wst.css.core.internal.format.FormatProcessorCSS;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
+import org.eclipse.wst.css.core.tests.util.FileUtil;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+public class BUG73990SelectorFormatTest extends AbstractModelTest {
+ public void testInsertText1() throws IOException {
+ ICSSModel model = getModel();
+ IStructuredDocument structuredDocument = model.getStructuredDocument();
+ structuredDocument.set(FileUtil.createString(
+ "src/org/eclipse/wst/css/core/tests/testfiles",
+ "BUG73990_selector_unformatted.css"));
+
+ (new FormatProcessorCSS()).formatModel(model);
+
+ String expected = FileUtil.createString(
+ "src/org/eclipse/wst/css/core/tests/testfiles/results",
+ "BUG73990_selector_formatted.css");
+ // Note: FileUtil.createString() added a commonEOL to the expected
+ // string. We have to concat a commonEOL to the actual string.
+ String actual = structuredDocument.get().concat(FileUtil.commonEOL);
+ assertEquals(expected, actual);
+ }
+}
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/BUG73990_selector_unformatted.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/BUG73990_selector_unformatted.css
similarity index 100%
rename from tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/BUG73990_selector_unformatted.css
rename to tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/BUG73990_selector_unformatted.css
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/CSSStyleRuleTest.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/CSSStyleRuleTest.css
index 0d205a2..f5d6801 100644
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/CSSStyleRuleTest.css
+++ b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/CSSStyleRuleTest.css
@@ -1,43 +1,43 @@
/* primitive values */
NUMBERS {
- NUMBER: 123.456;
- PERCENTAGE: 123.456%;
- EMS: 123.456em;
- EXS: 123.456ex;
- PX: 123.456px;
- PX2: -123px;
- CM: 123.456cm;
- MM: 123.456mm;
- IN: 123.456in;
- PT: 123.456pt;
- PC: 123.456pc;
- DEG: -123.456deg;
- RAD: 123.456rad;
- GRAD: 123.456grad;
- MS: 123.456ms;
- S: 123.456s;
- HZ: 123.456Hz;
- KHZ: 123.456kHz;
- DIMENSION: -123.456zzz;
- INTEGER: 123;
+ NUMBER: 123.456;
+ PERCENTAGE: 123.456%;
+ EMS: 123.456em;
+ EXS: 123.456ex;
+ PX: 123.456px;
+ PX2: -123px;
+ CM: 123.456cm;
+ MM: 123.456mm;
+ IN: 123.456in;
+ PT: 123.456pt;
+ PC: 123.456pc;
+ DEG: -123.456deg;
+ RAD: 123.456rad;
+ GRAD: 123.456grad;
+ MS: 123.456ms;
+ S: 123.456s;
+ HZ: 123.456Hz;
+ KHZ: 123.456kHz;
+ DIMENSION: -123.456zzz;
+ INTEGER: 123;
}
STRINGS {
- STRING: "string";
- URI: URL("http://www.ibm.com/");
- IDENT: left;
- HASH: #abcdef;
- URANGE: U+20A7;
- SLASH: /;
- COMMA: ,;
- INHERIT_PRIMITIVE: inherit;
- ATTR: attr(KEY);
- FORMAT: format("truedoc");
- LOCAL: local("Excelsior Roman");
+ STRING: "string";
+ URI: URL("http://www.ibm.com/");
+ IDENT: left;
+ HASH: #abcdef;
+ URANGE: U+20A7;
+ SLASH: /;
+ COMMA: ,;
+ INHERIT_PRIMITIVE: inherit;
+ ATTR: attr(KEY);
+ FORMAT: format("truedoc");
+ LOCAL: local("Excelsior Roman");
}
FUNCTIONS {
- COUNTER: counter(par-num, upper-roman);
- RECT: rect(12, 34, 56, 78);
- RGBCOLOR: rgb(255, 128, 0);
+ COUNTER: counter(par-num, upper-roman);
+ RECT: rect(12, 34, 56, 78);
+ RGBCOLOR: rgb(255, 128, 0);
}
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/BUG73990_selector_formatted.css b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/results/BUG73990_selector_formatted.css
similarity index 100%
rename from tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/format/testfiles/BUG73990_selector_formatted.css
rename to tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/testfiles/results/BUG73990_selector_formatted.css
diff --git a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/util/StringCompareUtil.java b/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/util/StringCompareUtil.java
deleted file mode 100644
index d4b3723..0000000
--- a/tests/org.eclipse.wst.css.core.tests/src/org/eclipse/wst/css/core/tests/util/StringCompareUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.wst.css.core.tests.util;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-public class StringCompareUtil {
-
- public boolean equalsIgnoreLineSeperator(String string1, String string2) {
-
- if (string1 == null)
- return false;
- if (string2 == null)
- return false;
-
- StringReader s1Reader = new StringReader(string1);
- StringReader s2Reader = new StringReader(string2);
-
- // assume true unless find evidence to the contrary
- boolean result = true;
- int s1Char = -1;
- int s2Char = -1;
- do {
-
- s1Char = getNextChar(s1Reader);
-
- s2Char = getNextChar(s2Reader);
-
- if (s1Char != s2Char) {
- result = false;
- break;
- }
- }
- while (s1Char != -1 && s2Char != -1);
-
- return result;
- }
-
- /**
- * Method getNextChar.
- * @param s1Reader
- * @return char
- */
- private int getNextChar(StringReader reader) {
- int nextChar = -1;
- try {
- nextChar = reader.read();
- while (isEOL(nextChar)) {
- nextChar = reader.read();
- }
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- return nextChar;
- }
-
- private boolean isEOL(int aChar) {
- return (aChar == '\n' || aChar == '\r');
- }
-
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.core.tests/test.xml b/tests/org.eclipse.wst.css.core.tests/test.xml
index d653a3d..33b2fd4 100644
--- a/tests/org.eclipse.wst.css.core.tests/test.xml
+++ b/tests/org.eclipse.wst.css.core.tests/test.xml
@@ -1,115 +1,87 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
- <!-- should be little need to change what's above -->
-
+ <!-- sets the properties plugin-name, and library-file -->
<property
name="plugin-name"
value="org.eclipse.wst.css.core.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.css.core.tests.CSSCoreTestSuite" />
- <property
- name="testType"
- value="core-test" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <!-- should be little need to change what's below -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.css.core.tests.*xml" />
+ </delete>
+ </target>
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
+ <ant
+ target="core-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.css.core.tests.CSSCoreTestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!-- <delete dir="${workspace}" quiet="true" /> -->
+ </target>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.css.core.tests.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.tests.encoding/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.css.tests.encoding/META-INF/MANIFEST.MF
index 311836e..ab2b19d 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.css.tests.encoding/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.wst.css.tests.encoding
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
Bundle-ClassPath: cssencodingtests.jar
Bundle-Activator: org.eclipse.wst.css.tests.encoding.CSSEncodingTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
@@ -12,7 +12,7 @@
Require-Bundle: org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.wst.css.core,
- org.junit,
+ org.junit;bundle-version="[3.8.0,4.0.0)",
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.tests.encoding
Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.wst.css.tests.encoding/build.properties b/tests/org.eclipse.wst.css.tests.encoding/build.properties
index 5960054..70bc090 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/build.properties
+++ b/tests/org.eclipse.wst.css.tests.encoding/build.properties
@@ -1,3 +1,13 @@
+###############################################################################
+# Copyright (c) 2005, 2006 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
+###############################################################################
bin.includes = cssencodingtests.jar,\
testfiles/,\
test.xml,\
diff --git a/tests/org.eclipse.wst.css.tests.encoding/plugin.properties b/tests/org.eclipse.wst.css.tests.encoding/plugin.properties
index 053e969..176c747 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/plugin.properties
+++ b/tests/org.eclipse.wst.css.tests.encoding/plugin.properties
@@ -1,3 +1,13 @@
+###############################################################################
+# Copyright (c) 2005, 2006 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
+###############################################################################
# properties file for org.eclipse.wst.css.tests.encoding
Bundle-Vendor.0 = Eclipse.org
Bundle-Name.0 = CSS Encoding Tests Plug-in
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestSuite.java b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestSuite.java
index e3e7289..290d54b 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestSuite.java
+++ b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestSuite.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2005 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
*******************************************************************************/
@@ -53,4 +53,4 @@
public CSSEncodingTestSuite(String name) {
super(name);
}
-}
\ No newline at end of file
+}
diff --git a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestsPlugin.java b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestsPlugin.java
index 49ed324..da799c0 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestsPlugin.java
+++ b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/CSSEncodingTestsPlugin.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 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
*******************************************************************************/
@@ -138,4 +138,4 @@
return null;
}
-}
\ No newline at end of file
+}
diff --git a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSEncodingTester.java b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSEncodingTester.java
index 4f0b0ff..e2c14fa 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSEncodingTester.java
+++ b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSEncodingTester.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 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
*******************************************************************************/
@@ -168,4 +168,4 @@
doTestFileStream(filename, "SHIFT_JIS", new CSSResourceEncodingDetector());
}
-}
\ No newline at end of file
+}
diff --git a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSHeadTokenizerTester.java b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSHeadTokenizerTester.java
index 1212d1c..666671f 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSHeadTokenizerTester.java
+++ b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/CSSHeadTokenizerTester.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2007 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
*******************************************************************************/
@@ -144,4 +144,4 @@
String filename = this.fileLocation + "encoding_test_sjis.css";
doTestFile(filename, "SHIFT_JIS");
}
-}
\ No newline at end of file
+}
diff --git a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/EncodingParserConstants.java b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/EncodingParserConstants.java
index cc60cd8..c4144a7 100644
--- a/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/EncodingParserConstants.java
+++ b/tests/org.eclipse.wst.css.tests.encoding/src/org/eclipse/wst/css/tests/encoding/css/EncodingParserConstants.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
+ * Copyright (c) 2001, 2005 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
* Jens Lukowski/Innoopract - initial renaming/restructuring
diff --git a/tests/org.eclipse.wst.css.ui.tests/test.xml b/tests/org.eclipse.wst.css.ui.tests/test.xml
index f55274d..82dc126 100644
--- a/tests/org.eclipse.wst.css.ui.tests/test.xml
+++ b/tests/org.eclipse.wst.css.ui.tests/test.xml
@@ -1,115 +1,47 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<project name="testsuite" default="run" basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!--<property name="eclipse-home" value="${basedir}\..\.."/>-->
-<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
-
- <!-- should be little need to change what's above -->
-
- <property
- name="plugin-name"
- value="org.eclipse.wst.css.ui.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.css.ui.tests.CSSUITestSuite" />
- <property
- name="testType"
- value="ui-test" />
-
- <!-- should be little need to change what's below -->
-
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- sets the properties plugin-name, and library-file -->
+ <property name="plugin-name" value="org.eclipse.wst.css.ui.tests" />
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org.eclipse.wst.css.ui.tests.*xml" />
+ </delete>
+ </target>
- </target>
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <delete dir="${workspace}" quiet="true" />
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${workspace}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="org.eclipse.wst.css.ui.tests.CSSUITestSuite" />
+ </ant>
+ </target>
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!--<delete dir="${workspace}" quiet="true"/>-->
+ </target>
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org.eclipse.wst.css.ui.tests.*xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.dtd.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.dtd.ui.tests/META-INF/MANIFEST.MF
index d80e331..1e933be 100644
--- a/tests/org.eclipse.wst.dtd.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.dtd.ui.tests/META-INF/MANIFEST.MF
@@ -22,6 +22,6 @@
org.eclipse.wst.sse.core,
org.eclipse.wst.sse.ui,
org.eclipse.wst.xml.core,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
com.ibm.icu
Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.wst.dtd.ui.tests/test.xml b/tests/org.eclipse.wst.dtd.ui.tests/test.xml
index 9cbf4b6..6e19253 100644
--- a/tests/org.eclipse.wst.dtd.ui.tests/test.xml
+++ b/tests/org.eclipse.wst.dtd.ui.tests/test.xml
@@ -1,115 +1,87 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.."/> -->
- <!-- should be little need to change what's above -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
+ <!-- sets the properties plugin-name, and library-file -->
<property
name="plugin-name"
value="org.eclipse.wst.dtd.ui.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.dtd.ui.tests.DTDUITestSuite" />
- <property
- name="testType"
- value="ui-test" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <!-- should be little need to change what's below -->
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.dtd.ui.tests.*xml" />
+ </delete>
+ </target>
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${workspace}"
+ quiet="true" />
+ <ant
+ target="ui-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.dtd.ui.tests.DTDUITestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!--<delete dir="${workspace}" quiet="true"/>-->
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.dtd.ui.tests.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="nitind@us.ibm.com,david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.html.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.html.core.tests/META-INF/MANIFEST.MF
index bec3dc0..a0d396a 100644
--- a/tests/org.eclipse.wst.html.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.html.core.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.wst.html.core.tests
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-ClassPath: htmlcoretests.jar
Bundle-Activator: org.eclipse.wst.html.core.tests.HTMLCoreTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
diff --git a/tests/org.eclipse.wst.html.tests.encoding/test.xml b/tests/org.eclipse.wst.html.tests.encoding/test.xml
index fbbf772..772fa96 100644
--- a/tests/org.eclipse.wst.html.tests.encoding/test.xml
+++ b/tests/org.eclipse.wst.html.tests.encoding/test.xml
@@ -1,115 +1,89 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
- <!-- should be little need to change what's above -->
+ <!-- Configurable Properties -->
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
+
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
+
+ <!-- sets the properties plugin-name, and library-file -->
<property
name="plugin-name"
value="org.eclipse.wst.html.tests.encoding" />
- <property
- name="classname"
- value="org.eclipse.wst.html.tests.encoding.HTMLEncodingTestSuite" />
- <property
- name="testType"
- value="core-test" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <!-- should be little need to change what's below -->
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.html.tests.encoding.*xml" />
+ </delete>
+ </target>
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
+ <ant
+ target="core-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="org.eclipse.wst.html.tests.encoding" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.html.tests.encoding.HTMLEncodingTestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!--<delete dir="${workspace}" quiet="true" />-->
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.html.tests.encoding.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ <!--<emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.html.ui.tests/test.xml b/tests/org.eclipse.wst.html.ui.tests/test.xml
index 2ba6ac2..e1e1f3b 100644
--- a/tests/org.eclipse.wst.html.ui.tests/test.xml
+++ b/tests/org.eclipse.wst.html.ui.tests/test.xml
@@ -1,114 +1,87 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
- <!-- should be little need to change what's above -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
+
+ <!-- sets the properties plugin-name, and library-file -->
<property
name="plugin-name"
value="org.eclipse.wst.html.ui.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.html.ui.tests.HTMLUITestSuite" />
- <property
- name="testType"
- value="ui-test" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <!-- should be little need to change what's below -->
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.html.ui.tests.*xml" />
+ </delete>
+ </target>
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
+ <ant
+ target="ui-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.html.ui.tests.HTMLUITestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!--<delete dir="${workspace}" quiet="true" />-->
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.html.ui.tests.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.sse.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.sse.core.tests/META-INF/MANIFEST.MF
index eeeb300..6c7381e 100644
--- a/tests/org.eclipse.wst.sse.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.sse.core.tests/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@
org.eclipse.wst.sse.core.tests.life,
org.eclipse.wst.sse.core.tests.threading
Require-Bundle: org.eclipse.core.resources,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
org.eclipse.wst.sse.core,
org.eclipse.core.runtime,
com.ibm.icu
diff --git a/tests/org.eclipse.wst.sse.core.tests/test.xml b/tests/org.eclipse.wst.sse.core.tests/test.xml
index b8e3cbe..024ba6d 100644
--- a/tests/org.eclipse.wst.sse.core.tests/test.xml
+++ b/tests/org.eclipse.wst.sse.core.tests/test.xml
@@ -1,114 +1,89 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
- <!-- should be little need to change what's above -->
- <property
- name="plugin-name"
- value="org.eclipse.wst.sse.core.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.sse.core.tests.SSEModelTestSuite" />
- <property
- name="testType"
- value="core-test" />
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
- <!-- should be little need to change what's below -->
+ <!-- sets the properties plugin-name, and library-file -->
+ <property
+ name="plugin-name"
+ value="org.eclipse.wst.sse.core.tests" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
+ <property
+ name="workspace"
+ value="${eclipse-home}/junitworkspace-${plugin-name}" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.sse.core.tests.*xml" />
+ </delete>
+ </target>
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
+ <ant
+ target="core-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.sse.core.tests.SSEModelTestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!--<delete dir="${workspace}" quiet="true" />-->
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.sse.core.tests.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.sse.ui.tests/test.xml b/tests/org.eclipse.wst.sse.ui.tests/test.xml
index ce65ee0..da34e59 100644
--- a/tests/org.eclipse.wst.sse.ui.tests/test.xml
+++ b/tests/org.eclipse.wst.sse.ui.tests/test.xml
@@ -1,116 +1,89 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.."/> -->
- <!-- should be little need to change what's above -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
+ <!-- sets the properties plugin-name, and library-file -->
+ <property
+ name="plugin-name"
+ value="org.eclipse.wst.sse.ui.tests" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
+ <property
+ name="workspace"
+ value="${eclipse-home}/junitworkspace-${plugin-name}" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.sse.ui.tests.*xml" />
+ </delete>
+ </target>
- <property
- name="plugin-name"
- value="org.eclipse.wst.sse.ui.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.sse.ui.tests.SSEUITestSuite" />
- <property
- name="testType"
- value="ui-test" />
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${workspace}"
+ quiet="true" />
+ <ant
+ target="ui-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.sse.ui.tests.SSEUITestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
- <!-- should be little need to change what's below -->
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!--<delete dir="${workspace}" quiet="true"/>-->
+ </target>
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
-
-
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.sse.ui.tests.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/.cvsignore b/tests/org.eclipse.wst.xml.catalog.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/.project b/tests/org.eclipse.wst.xml.catalog.tests/.project
deleted file mode 100644
index c417514..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/.project
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xml.core</name>
- <comment></comment>
- <projects></projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.wst.xml.catalog.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 6c7d10e..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Mar 25 17:34:01 EST 2005
-eclipse.preferences.version=1
-encoding//data/PublicationCatalogue/Catalogue.xsd=UTF8
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xml.catalog.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 55f6cc3..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Test Plug-in
-Bundle-SymbolicName: org.eclipse.wst.xml.catalog.tests; singleton:=true
-Bundle-Version: 0.7.0
-Bundle-Activator: org.eclipse.wst.xml.catalog.tests.internal.TestPlugin
-Bundle-Vendor: IBM
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.xml.catalog.tests.internal,
- org.eclipse.wst.xml.resolver.tools.tests.internal,
- org.eclipse.wst.xml.uriresolver.validation.tests.internal
-Require-Bundle: org.eclipse.core.runtime,
- org.junit,
- org.eclipse.wst.xml.core,
- org.apache.xerces,
- org.eclipse.xsd
-Eclipse-AutoStart: true
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/about.html b/tests/org.eclipse.wst.xml.catalog.tests/about.html
deleted file mode 100644
index 4ec5989..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>May 2, 2006</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the RedistributorÂ’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/build.properties b/tests/org.eclipse.wst.xml.catalog.tests/build.properties
deleted file mode 100644
index 46ff36b..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-source.catalogtests.jar = src/
-output.catalogtests.jar = bin/
-bin.includes = actual_results/,\
- data/,\
- jars/,\
- plugin.xml,\
- test.xml,\
- META-INF/,\
- catalogtests.jar,\
- about.html
-
-src.includes = actual_results/
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/Invoice/Invoice.dtd b/tests/org.eclipse.wst.xml.catalog.tests/data/Invoice/Invoice.dtd
deleted file mode 100644
index 0737ba6..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/Invoice/Invoice.dtd
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!ELEMENT Invoice (Header,Item+)>
-<!ELEMENT Header (Date,BillTo)>
-<!ATTLIST Header
- invoiceNumber CDATA #REQUIRED
->
-<!ELEMENT Item (description*)>
-<!ATTLIST Item
- price CDATA #REQUIRED
- discount (promotion | regular) "regular"
->
-<!ELEMENT Date ((Month,Day,Year)|(Day,Month,Year))>
-<!ELEMENT BillTo (Address)>
-<!ATTLIST BillTo
- custNumber ID #REQUIRED
- name CDATA #IMPLIED
- phone CDATA #IMPLIED
->
-<!ELEMENT description (#PCDATA)>
-<!ELEMENT Address (street1,street2?,city,(state|province),zip,country?)>
-<!ELEMENT street1 (#PCDATA)>
-<!ELEMENT street2 (#PCDATA)>
-<!ELEMENT city (#PCDATA)>
-<!ELEMENT state (#PCDATA)>
-<!ELEMENT province (#PCDATA)>
-<!ELEMENT zip (#PCDATA)>
-<!ELEMENT country (#PCDATA)>
-<!ELEMENT Month (#PCDATA)>
-<!ELEMENT Day (#PCDATA)>
-<!ELEMENT Year (#PCDATA)>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/Invoice/Invoice.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/Invoice/Invoice.xml
deleted file mode 100644
index 6afe397..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/Invoice/Invoice.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Invoice PUBLIC "InvoiceId_test" "Invoice.dtd" >
-<Invoice>
- <Header invoiceNumber="12345">
- <Date>
- <Month>July</Month>
- <Day>15</Day>
- <Year>2001</Year>
- </Date>
- <BillTo custNumber="X5739" name="Milton McGoo" phone="416-448-4414">
- <Address>
- <street1>IBM</street1>
- <street2>1150 Eglinton Ave East</street2>
- <city>Toronto</city>
- <state>Ontario</state>
- <zip>M3C 1H7</zip>
- <country>Canada</country>
- </Address>
- </BillTo>
- </Header>
- <Item discount="promotion" price="57">
- <description>high speed 3D graphics card</description>
- </Item>
-</Invoice>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal-schema.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal-schema.xml
deleted file mode 100644
index c2f725b..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal-schema.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation='personal.xsd'>
-
- <person id="Big.Boss" >
- <name><family>Boss</family> <given>Big</given></name>
- <email>chief@foo.com</email>
- <link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
- </person>
-
- <person id="one.worker">
- <name><family>Worker</family> <given>One</given></name>
- <email>one@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="two.worker">
- <name><family>Worker</family> <given>Two</given></name>
- <email>two@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="three.worker">
- <name><family>Worker</family> <given>Three</given></name>
- <email>three@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="four.worker">
- <name><family>Worker</family> <given>Four</given></name>
- <email>four@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="five.worker">
- <name><family>Worker</family> <given>Five</given></name>
- <email>five@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
-</personnel>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.dtd b/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.dtd
deleted file mode 100644
index c64e48a..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.dtd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml encoding="UTF-8"?>
-<!ELEMENT personnel (person)+>
-
-<!ELEMENT person (name,email*,url*,link?)>
-<!ATTLIST person id ID #REQUIRED>
-<!ATTLIST person note CDATA #IMPLIED>
-<!ATTLIST person contr (true|false) 'false'>
-<!ATTLIST person salary CDATA #IMPLIED>
-
-<!ELEMENT name ((family,given)|(given,family))>
-
-<!ELEMENT family (#PCDATA)>
-
-<!ELEMENT given (#PCDATA)>
-
-<!ELEMENT email (#PCDATA)>
-
-<!ELEMENT url EMPTY>
-<!ATTLIST url href CDATA 'http://'>
-
-<!ELEMENT link EMPTY>
-<!ATTLIST link manager IDREF #IMPLIED>
-<!ATTLIST link subordinates IDREFS #IMPLIED>
-
-<!NOTATION gif PUBLIC '-//APP/Photoshop/4.0' 'photoshop.exe'>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.xml
deleted file mode 100644
index 9c3e438..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE personnel SYSTEM "http://personal/personal.dtd">
-<personnel>
-
- <person id="Big.Boss">
- <name><family>Boss</family> <given>Big</given></name>
- <email>chief@foo.com</email>
- <link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
- </person>
-
- <person id="one.worker">
- <name><family>Worker</family> <given>One</given></name>
- <email>one@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="two.worker">
- <name><family>Worker</family> <given>Two</given></name>
- <email>two@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="three.worker">
- <name><family>Worker</family> <given>Three</given></name>
- <email>three@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="four.worker">
- <name><family>Worker</family> <given>Four</given></name>
- <email>four@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
- <person id="five.worker">
- <name><family>Worker</family> <given>Five</given></name>
- <email>five@foo.com</email>
- <link manager="Big.Boss"/>
- </person>
-
-</personnel>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.xsd
deleted file mode 100644
index 05e3183..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/Personal/personal.xsd
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
-
- <xs:element name="personnel">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="person" minOccurs='1' maxOccurs='unbounded'/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:unique name="unique1">
- <xs:selector xpath="person"/>
- <xs:field xpath="name/given"/>
- <xs:field xpath="name/family"/>
- </xs:unique>
- <xs:key name='empid'>
- <xs:selector xpath="person"/>
- <xs:field xpath="@id"/>
- </xs:key>
- <xs:keyref name="keyref1" refer='empid'>
- <xs:selector xpath="person"/>
- <xs:field xpath="link/@manager"/>
- </xs:keyref>
-
- </xs:element>
-
- <xs:element name="person">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="name"/>
- <xs:element ref="email" minOccurs='0' maxOccurs='unbounded'/>
- <xs:element ref="url" minOccurs='0' maxOccurs='unbounded'/>
- <xs:element ref="link" minOccurs='1' maxOccurs='1'/>
- </xs:sequence>
- <xs:attribute name="id" type="xs:ID" use='required'/>
- <xs:attribute name="note" type="xs:string"/>
- <xs:attribute name="contr" default="false">
- <xs:simpleType>
- <xs:restriction base = "xs:string">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="salary" type="xs:integer"/>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="name">
- <xs:complexType>
- <xs:all>
- <xs:element ref="family"/>
- <xs:element ref="given"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="family" type='xs:string'/>
-
- <xs:element name="given" type='xs:string'/>
-
- <xs:element name="email" type='xs:string'/>
-
- <xs:element name="url">
- <xs:complexType>
- <xs:attribute name="href" type="xs:string" default="http://"/>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="link">
- <xs:complexType>
- <xs:attribute name="manager" type="xs:IDREF"/>
- <xs:attribute name="subordinates" type="xs:IDREFS"/>
- </xs:complexType>
- </xs:element>
-
- <xs:notation name='gif' public='-//APP/Photoshop/4.0' system='photoshop.exe'/>
-
-</xs:schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PublicationCatalogue/Catalogue.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/PublicationCatalogue/Catalogue.xml
deleted file mode 100644
index e66621d..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PublicationCatalogue/Catalogue.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<c:Catalogue xmlns:c="http://www.eclipse.org/webtools/Catalogue/test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eclipse.org/webtools/Catalogue/test Catalogue.xsd ">
- <c:Book>
- <title>Professional XML Schema</title>
- <date>2001</date>
- <isbn>1-861005-47-4</isbn>
- <publisher>Wrox Press</publisher>
- </c:Book>
- <c:Magazine>
- <title>WebSphere Developer's Journal</title>
- <date>2001</date>
- </c:Magazine>
- <c:Book>
- <title>Java and XSLT</title>
- <date>2001</date>
- <isbn>0-596-00143-6</isbn>
- <publisher>O'Reilly</publisher>
- </c:Book>
-</c:Catalogue>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PublicationCatalogue/Catalogue.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/PublicationCatalogue/Catalogue.xsd
deleted file mode 100644
index 1668642..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PublicationCatalogue/Catalogue.xsd
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema targetNamespace="http://www.eclipse.org/webtools/Catalogue/test"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:c="http://www.eclipse.org/webtools/Catalogue/test"
- xsi:schemaLocation="http://www.eclipse.org/webtools/Catalogue/test Catalogue.xsd ">
- <group name="test">
- <sequence>
- <element name="test1"></element>
- </sequence>
- </group>
- <complexType name="PublicationType">
- <sequence>
- <element name="title" type="string"></element>
- <element name="author" type="string" minOccurs="0"
- maxOccurs="unbounded">
- </element>
- <element name="date" type="gYear"></element>
- </sequence>
- </complexType>
-
- <complexType name="BookType">
- <complexContent>
- <extension base="c:PublicationType">
- <sequence>
- <element name="isbn" type="string" />
- <element name="publisher" type="string" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="MagazineType">
- <complexContent>
- <restriction base="c:PublicationType">
- <sequence>
- <element name="title" type="string" />
- <element name="author" type="string" minOccurs="0"
- maxOccurs="0" />
- <element name="date" type="gYear"></element>
- </sequence>
- </restriction>
- </complexContent>
- </complexType>
-
- <element name="Publication" type="c:PublicationType"
- abstract="true">
- </element>
-
- <element name="Book" type="c:BookType"
- substitutionGroup="c:Publication">
- </element>
-
- <element name="Magazine" type="c:MagazineType"
- substitutionGroup="c:Publication">
- </element>
-
- <element name="Catalogue">
- <complexType>
- <sequence>
- <element ref="c:Publication" maxOccurs="unbounded"></element>
- </sequence>
- </complexType>
- </element>
-
-</schema>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/PurchaseOrder.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/PurchaseOrder.xml
deleted file mode 100644
index 12bd7e6..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/PurchaseOrder.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<po:purchaseOrder orderDate="2001-01-01" xmlns:po="http://www.ibm.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com PurchaseOrder.xsd">
- <shipTo country="US">
- <name>Alice Smith</name>
- <street>125 Maple Street</street>
- <city>Mill Valley</city>
- <state>CA</state>
- <zip>90952</zip>
- </shipTo>
- <billTo country="US">
- <name>Robert Smith</name>
- <street>8 Oak Avenue</street>
- <city>Old Town</city>
- <state>PA</state>
- <zip>95819</zip>
- </billTo>
- <po:comment>Hurry, my lawn is going wild!</po:comment>
- <items>
- <item partNum="872-AA">
- <productName>Lawnmower</productName>
- <quantity>1</quantity>
- <USPrice>148.95</USPrice>
- <po:comment>Confirm this is electric</po:comment>
- </item>
- <item partNum="926-AA">
- <productName>Baby Monitor</productName>
- <quantity>1</quantity>
- <USPrice>39.98</USPrice>
- <shipDate>2001-07-21</shipDate>
- </item>
- </items>
-</po:purchaseOrder>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/PurchaseOrder.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/PurchaseOrder.xsd
deleted file mode 100644
index d0fb094..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/PurchaseOrder.xsd
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.ibm.com"
- xmlns:po="http://www.ibm.com">
- <annotation>
- <documentation xml:lang="en">
- Purchase order schema example from XML Schema Part 0: Primer
-
- Copyright 2001, IBM Corp. All rights reserved
- Copyright 2001, World Wide Web Consortium,
- (Massachusetts Institute of Technology, Institut National de Recherche en Informatiqueet en Automatique, Keio University).
- All Rights Reserved.
- </documentation>
- </annotation>
-
- <element name="purchaseOrder" type="po:PurchaseOrderType"/>
-
- <element name="comment" type="string"/>
-
- <complexType name="PurchaseOrderType">
- <sequence>
- <element name="shipTo" type="po:USAddress"/>
- <element name="billTo" type="po:USAddress"/>
- <element ref="po:comment" minOccurs="0"/>
- <element name="items" type="po:Items"/>
- </sequence>
- <attribute name="orderDate" type="date"/>
- </complexType>
-
- <complexType name="USAddress">
- <sequence>
- <element name="name" type="string"/>
- <element name="street" type="string"/>
- <element name="city" type="string"/>
- <element name="state" type="po:USState"/>
- <element name="zip" type="decimal"/>
- </sequence>
- <attribute name="country" type="NMTOKEN" fixed="US"/>
- </complexType>
-
- <complexType name="Items">
- <sequence>
- <element name="item" minOccurs="0" maxOccurs="unbounded">
- <complexType>
- <sequence>
- <element name="productName" type="string"/>
- <element name="quantity">
- <simpleType>
- <restriction base="positiveInteger">
- <maxExclusive value="100"/>
- </restriction>
- </simpleType>
- </element>
- <element name="USPrice" type="decimal"/>
- <element ref="po:comment" minOccurs="0"/>
- <element name="shipDate" type="date" minOccurs="0"/>
- </sequence>
- <attribute name="partNum" type="po:SKU" use="required"/>
- </complexType>
- </element>
- </sequence>
- </complexType>
-
- <simpleType name="SKU">
- <restriction base="string">
- <pattern value="\d{3}-[A-Z]{2}"/>
- </restriction>
- </simpleType>
-
- <simpleType name="USState">
- <restriction base="string">
- <enumeration value="CA"></enumeration>
- <enumeration value="PA"></enumeration>
- <enumeration value="AR"></enumeration>
- </restriction>
- </simpleType>
-</schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/address.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/address.xsd
deleted file mode 100644
index 26ea442..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/address.xsd
+++ /dev/null
@@ -1,68 +0,0 @@
-<schema targetNamespace="http://www.example.com/IPO"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ipo="http://www.example.com/IPO">
-
- <annotation>
- <documentation xml:lang="en">
- Addresses for International Purchase order schema
- Copyright 2000 Example.com. All rights reserved.
- </documentation>
- </annotation>
-
- <complexType name="Address">
- <sequence>
- <element name="name" type="string"/>
- <element name="street" type="string"/>
- <element name="city" type="string"/>
- </sequence>
- </complexType>
-
- <complexType name="USAddress">
- <complexContent>
- <extension base="ipo:Address">
- <sequence>
- <element name="state" type="ipo:USState"/>
- <element name="zip" type="positiveInteger"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="UKAddress">
- <complexContent>
- <extension base="ipo:Address">
- <sequence>
- <element name="postcode" type="ipo:UKPostcode"/>
- </sequence>
- <attribute name="exportCode" type="positiveInteger" fixed="1"/>
- </extension>
- </complexContent>
- </complexType>
-
- <!-- other Address derivations for more countries -->
-
- <simpleType name="USState">
- <restriction base="string">
- <enumeration value="AK"/>
- <enumeration value="AL"/>
- <enumeration value="AR"/>
- <!-- and so on ... -->
- </restriction>
- </simpleType>
-
- <!-- simple type definition for Postcode -->
- <simpleType name="Postcode">
- <restriction base="string">
- </restriction>
- </simpleType>
-
- <!-- simple type definition for UKPostcode -->
- <simpleType name="UKPostcode">
- <restriction base="ipo:Postcode">
- <pattern value="[A-Z]{2}\d\s\d[A-Z]{2}"/>
- </restriction>
- </simpleType>
-
-
-</schema>
-
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo.xml
deleted file mode 100644
index d483ade..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<ipo:purchaseOrder
- orderDate="2001-01-01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipo="http://www.example.com/IPO" xsi:schemaLocation="http://www.example.com/IPO ipo.xsd ">
-
- <shipTo exportCode="1" xsi:type="ipo:UKAddress">
- <name>Helen Zoe</name>
- <street>47 Eden Street</street>
- <city>Cambridge</city>
- <postcode>CB1 1JR</postcode>
- </shipTo>
-
- <billTo xsi:type="ipo:USAddress">
- <name>Robert Smith</name>
- <street>8 Oak Avenue</street>
- <city>Old Town</city>
- <state>AR</state>
- <zip>95819</zip>
- </billTo>
-
- <items>
- <item partNum="833-AA">
- <productName>Lapis necklace</productName>
- <quantity>1</quantity>
- <USPrice>99.95</USPrice>
- <ipo:comment>Want this for the holidays!</ipo:comment>
- <shipDate>1999-12-05</shipDate>
- </item>
- </items>
-</ipo:purchaseOrder>
-
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo.xsd
deleted file mode 100644
index 7a63d01..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo.xsd
+++ /dev/null
@@ -1,59 +0,0 @@
-<schema targetNamespace="http://www.example.com/IPO"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ipo="http://www.example.com/IPO">
-
- <annotation>
- <documentation xml:lang="en">
- International Purchase order schema for Example.com
- Copyright 2000 Example.com. All rights reserved.
- </documentation>
- </annotation>
-
- <!-- include address constructs -->
- <include
- schemaLocation="address.xsd"/>
-
- <element name="purchaseOrder" type="ipo:PurchaseOrderType"/>
-
- <element name="comment" type="string"/>
-
- <complexType name="PurchaseOrderType">
- <sequence>
- <element name="shipTo" type="ipo:Address"/>
- <element name="billTo" type="ipo:Address"/>
- <element ref="ipo:comment" minOccurs="0"/>
- <element name="items" type="ipo:Items"/>
- </sequence>
- <attribute name="orderDate" type="date"/>
- </complexType>
-
- <complexType name="Items">
- <sequence>
- <element name="item" minOccurs="0" maxOccurs="unbounded">
- <complexType>
- <sequence>
- <element name="productName" type="string"/>
- <element name="quantity">
- <simpleType>
- <restriction base="positiveInteger">
- <maxExclusive value="100"/>
- </restriction>
- </simpleType>
- </element>
- <element name="USPrice" type="decimal"/>
- <element ref="ipo:comment" minOccurs="0"/>
- <element name="shipDate" type="date" minOccurs="0"/>
- </sequence>
- <attribute name="partNum" type="ipo:SKU" use="required"/>
- </complexType>
- </element>
- </sequence>
- </complexType>
-
- <simpleType name="SKU">
- <restriction base="string">
- <pattern value="\d{3}-[A-Z]{2}"/>
- </restriction>
- </simpleType>
-
-</schema>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo_.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo_.xsd
deleted file mode 100644
index 436d49d..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/ipo_.xsd
+++ /dev/null
@@ -1,59 +0,0 @@
-<schema targetNamespace="http://www.example.com/IPO"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ipo="http://www.example.com/IPO">
-
- <annotation>
- <documentation xml:lang="en">
- International Purchase order schema for Example.com
- Copyright 2000 Example.com. All rights reserved.
- </documentation>
- </annotation>
-
- <!-- include address constructs -->
- <include
- schemaLocation="address_.xsd"/>
-
- <element name="purchaseOrder" type="ipo:PurchaseOrderType"/>
-
- <element name="comment" type="string"/>
-
- <complexType name="PurchaseOrderType">
- <sequence>
- <element name="shipTo" type="ipo:Address"/>
- <element name="billTo" type="ipo:Address"/>
- <element ref="ipo:comment" minOccurs="0"/>
- <element name="items" type="ipo:Items"/>
- </sequence>
- <attribute name="orderDate" type="date"/>
- </complexType>
-
- <complexType name="Items">
- <sequence>
- <element name="item" minOccurs="0" maxOccurs="unbounded">
- <complexType>
- <sequence>
- <element name="productName" type="string"/>
- <element name="quantity">
- <simpleType>
- <restriction base="positiveInteger">
- <maxExclusive value="100"/>
- </restriction>
- </simpleType>
- </element>
- <element name="USPrice" type="decimal"/>
- <element ref="ipo:comment" minOccurs="0"/>
- <element name="shipDate" type="date" minOccurs="0"/>
- </sequence>
- <attribute name="partNum" type="ipo:SKU" use="required"/>
- </complexType>
- </element>
- </sequence>
- </complexType>
-
- <simpleType name="SKU">
- <restriction base="string">
- <pattern value="\d{3}-[A-Z]{2}"/>
- </restriction>
- </simpleType>
-
-</schema>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report.xml
deleted file mode 100644
index 98ed6f1..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ex:purchaseReport
- xmlns:ex="http://www.example.com/Report"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.example.com/Report report.xsd">
- <ex:regions>
- <ex:zip code="39487">
- <ex:part number="293-AX" quantity="3"/>
- <ex:part number="293-LD" quantity="3"/>
- </ex:zip>
- <ex:zip code="29387">
- <ex:part number="897-JD" quantity="30"/>
- </ex:zip>
- <ex:zip code="19285">
- <ex:part number="123-CK" quantity="19"/>
- <ex:part number="175-FQ" quantity="8"/>
- </ex:zip>
- </ex:regions>
-
- <ex:parts>
- <ex:part number="293-AX"/>
- <ex:part number="897-JD"/>
- <ex:part number="123-CK"/>
- <ex:part number="293-LD"/>
- <ex:part number="175-FQ"/>
- </ex:parts>
-</ex:purchaseReport>
-
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report.xsd
deleted file mode 100644
index 0ee7ca4..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report.xsd
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.example.com/Report"
- xmlns:r="http://www.example.com/Report"
- xmlns:xipo="http://www.example.com/IPO"
- elementFormDefault="qualified">
- <annotation>
- <documentation>
- The Report Schema from XML Schema Part 0: Primer
-
- Copyright 2001, IBM Corp. All Rights Reserved.
- Copyright 2001, World Wide Web Consortium
- (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University).
- All Rights Reserved.
- </documentation>
- </annotation>
-
- <import namespace="http://www.example.com/IPO" schemaLocation="ipo.xsd"/>
-
- <element name="purchaseReport">
- <complexType>
- <sequence>
- <element name="regions" type="r:RegionsType"/>
-
- <element name="parts" type="r:PartsType"/>
- </sequence>
- <attribute name="period" type="duration"/>
- <attribute name="periodEnding" type="date"/>
- </complexType>
-
- <unique name="dummy1">
- <selector xpath="r:regions/r:zip"/>
- <field xpath="@code"/>
- </unique>
-
- <key name="pNumKey">
- <selector xpath="r:parts/r:part"/>
- <field xpath="@number"/>
- </key>
- <keyref name="dummy2" refer="r:pNumKey">
- <selector xpath="r:regions/r:zip/r:part"/>
- <field xpath="@number"/>
- </keyref>
- </element>
-
- <complexType name="RegionsType">
- <sequence>
- <element name="zip" maxOccurs="unbounded">
- <complexType>
- <sequence>
- <element name="part" maxOccurs="unbounded">
- <complexType>
- <complexContent>
- <restriction base="anyType">
- <attribute name="number" type="xipo:SKU"/>
- <attribute name="quantity" type="positiveInteger"/>
- </restriction>
- </complexContent>
- </complexType>
- </element>
- </sequence>
- <attribute name="code" type="positiveInteger"/>
- </complexType>
- </element>
- </sequence>
- </complexType>
-
- <complexType name="PartsType">
- <sequence>
- <element name="part" maxOccurs="unbounded">
- <complexType>
- <simpleContent>
- <extension base="string">
- <attribute name="number" type="xipo:SKU"/>
- </extension>
- </simpleContent>
- </complexType>
- </element>
- </sequence>
- </complexType>
-</schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report_.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report_.xml
deleted file mode 100644
index 7d34ce1..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report_.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ex:purchaseReport
- xmlns:ex="http://www.example.com/Report"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.example.com/Report">
- <ex:regions>
- <ex:zip code="39487">
- <ex:part number="293-AX" quantity="3"/>
- <ex:part number="293-LD" quantity="3"/>
- </ex:zip>
- <ex:zip code="29387">
- <ex:part number="897-JD" quantity="30"/>
- </ex:zip>
- <ex:zip code="19285">
- <ex:part number="123-CK" quantity="19"/>
- <ex:part number="175-FQ" quantity="8"/>
- </ex:zip>
- </ex:regions>
-
- <ex:parts>
- <ex:part number="293-AX"/>
- <ex:part number="897-JD"/>
- <ex:part number="123-CK"/>
- <ex:part number="293-LD"/>
- <ex:part number="175-FQ"/>
- </ex:parts>
-</ex:purchaseReport>
-
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report_.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report_.xsd
deleted file mode 100644
index cb284be..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/PurchaseOrder/international/report_.xsd
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.example.com/Report"
- xmlns:r="http://www.example.com/Report"
- xmlns:xipo="http://www.example.com/IPO"
- elementFormDefault="qualified">
- <annotation>
- <documentation>
- The Report Schema from XML Schema Part 0: Primer
-
- Copyright 2001, IBM Corp. All Rights Reserved.
- Copyright 2001, World Wide Web Consortium
- (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University).
- All Rights Reserved.
- </documentation>
- </annotation>
-
- <import namespace="http://www.example.com/IPO" schemaLocation="ipo__.xsd"/>
-
- <element name="purchaseReport">
- <complexType>
- <sequence>
- <element name="regions" type="r:RegionsType"/>
-
- <element name="parts" type="r:PartsType"/>
- </sequence>
- <attribute name="period" type="duration"/>
- <attribute name="periodEnding" type="date"/>
- </complexType>
-
- <unique name="dummy1">
- <selector xpath="r:regions/r:zip"/>
- <field xpath="@code"/>
- </unique>
-
- <key name="pNumKey">
- <selector xpath="r:parts/r:part"/>
- <field xpath="@number"/>
- </key>
- <keyref name="dummy2" refer="r:pNumKey">
- <selector xpath="r:regions/r:zip/r:part"/>
- <field xpath="@number"/>
- </keyref>
- </element>
-
- <complexType name="RegionsType">
- <sequence>
- <element name="zip" maxOccurs="unbounded">
- <complexType>
- <sequence>
- <element name="part" maxOccurs="unbounded">
- <complexType>
- <complexContent>
- <restriction base="anyType">
- <attribute name="number" type="xipo:SKU"/>
- <attribute name="quantity" type="positiveInteger"/>
- </restriction>
- </complexContent>
- </complexType>
- </element>
- </sequence>
- <attribute name="code" type="positiveInteger"/>
- </complexType>
- </element>
- </sequence>
- </complexType>
-
- <complexType name="PartsType">
- <sequence>
- <element name="part" maxOccurs="unbounded">
- <complexType>
- <simpleContent>
- <extension base="string">
- <attribute name="number" type="xipo:SKU"/>
- </extension>
- </simpleContent>
- </complexType>
- </element>
- </sequence>
- </complexType>
-</schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/catalog.xsd
deleted file mode 100644
index b00c82c..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog.xsd
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:er="http://oasis.names.tc.entity.xmlns.xml.catalog"
- targetNamespace="http://oasis.names.tc.entity.xmlns.xml.catalog"
- elementFormDefault="qualified">
-
- <!-- $Id: catalog.xsd,v 1.1 2005/06/24 04:17:50 csalter Exp $ -->
-
- <xs:simpleType name="pubIdChars">
- <!-- A string of the characters defined as pubIdChar in production 13
- of the Second Edition of the XML 1.0 Recommendation. Does not include
- the whitespace characters because they're normalized by XML parsing. -->
- <xs:restriction base="xs:string">
- <xs:pattern value="[a\-zA\-Z0\-9\-'()+,./:=?;!*#@$_%]*"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name='publicIdentifier'>
- <xs:restriction base="er:pubIdChars"/>
- </xs:simpleType>
-
- <xs:simpleType name='partialPublicIdentifier'>
- <xs:restriction base='er:pubIdChars'/>
- </xs:simpleType>
-
- <xs:simpleType name='systemOrPublic'>
- <xs:restriction base='xs:string'>
- <xs:enumeration value='system'/>
- <xs:enumeration value='public'/>
- </xs:restriction>
- </xs:simpleType>
-
- <!-- The global attribute xml:base is not explicitly declared; -->
- <!-- it is allowed by the anyAttribute declarations. -->
-
- <xs:complexType name='catalog'>
- <xs:choice minOccurs='1' maxOccurs='unbounded'>
- <xs:element ref='er:public'/>
- <xs:element ref='er:system'/>
- <xs:element ref='er:uri'/>
- <xs:element ref='er:rewriteSystem'/>
- <xs:element ref='er:rewriteURI'/>
- <xs:element ref='er:delegatePublic'/>
- <xs:element ref='er:delegateSystem'/>
- <xs:element ref='er:delegateURI'/>
- <xs:element ref='er:nextCatalog'/>
- <xs:element ref='er:group'/>
- <xs:any namespace='##other' processContents='skip'/>
- </xs:choice>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:attribute name='prefer' type='er:systemOrPublic'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:complexType name='public'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="publicId" type="er:publicIdentifier"
- use="required"/>
- <xs:attribute name="uri" type="xs:anyURI" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='system'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="systemId" type="xs:string"
- use="required"/>
- <xs:attribute name="uri" type="xs:anyURI" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='uri'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="name" type="xs:anyURI"
- use="required"/>
- <xs:attribute name="uri" type="xs:anyURI" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='rewriteSystem'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="systemIdStartString"
- type="xs:string"
- use="required"/>
- <xs:attribute name="rewritePrefix" type="xs:string" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='rewriteURI'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="uriIdStartString"
- type="xs:string"
- use="required"/>
- <xs:attribute name="rewritePrefix" type="xs:string" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='delegatePublic'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="publicIdStartString"
- type="er:partialPublicIdentifier"
- use="required"/>
- <xs:attribute name="catalog" type="xs:anyURI" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='delegateSystem'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="systemIdStartString"
- type="xs:string"
- use="required"/>
- <xs:attribute name="catalog" type="xs:anyURI" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='delegateURI'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="uriStartString"
- type="xs:string"
- use="required"/>
- <xs:attribute name="catalog" type="xs:anyURI" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='nextCatalog'>
- <xs:complexContent>
- <xs:restriction base="xs:anyType">
- <xs:attribute name="catalog" type="xs:anyURI" use="required"/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:restriction>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name='group'>
- <xs:choice minOccurs='1' maxOccurs='unbounded'>
- <xs:element ref='er:public'/>
- <xs:element ref='er:system'/>
- <xs:element ref='er:uri'/>
- <xs:element ref='er:rewriteSystem'/>
- <xs:element ref='er:rewriteURI'/>
- <xs:element ref='er:delegatePublic'/>
- <xs:element ref='er:delegateSystem'/>
- <xs:element ref='er:delegateURI'/>
- <xs:element ref='er:nextCatalog'/>
- <xs:any namespace='##other' processContents='skip'/>
- </xs:choice>
- <xs:attribute name='prefer' type='er:systemOrPublic'/>
- <xs:attribute name='id' type='xs:ID'/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:element name="catalog" type="er:catalog"/>
- <xs:element name="public" type="er:public"/>
- <xs:element name="system" type="er:system"/>
- <xs:element name="uri" type="er:uri"/>
- <xs:element name="rewriteSystem" type="er:rewriteSystem"/>
- <xs:element name="rewriteURI" type="er:rewriteURI"/>
- <xs:element name="delegatePublic" type="er:delegatePublic"/>
- <xs:element name="delegateSystem" type="er:delegateSystem"/>
- <xs:element name="delegateURI" type="er:delegateURI"/>
- <xs:element name="nextCatalog" type="er:nextCatalog"/>
- <xs:element name="group" type="er:group"/>
-
-</xs:schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog1.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/catalog1.xml
deleted file mode 100644
index 124bc14..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog1.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
- <public publicId="InvoiceId_test" uri="./Invoice/Invoice.dtd" webURL="http://webURL"/>
- <system systemId="Invoice.dtd" uri="./Invoice/Invoice.dtd" chached="yes" property="value1"/>
- <uri name="http://www.test.com/Invoice.dtd" uri="./Invoice/Invoice.dtd" chached="no" property="value2"/>
- <nextCatalog catalog="catalog2.xml" id="nextCatalog1"/>
-</catalog>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog2.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/catalog2.xml
deleted file mode 100644
index 4eca03c..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog2.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
- <public publicId="http://www.eclipse.org/webtools/Catalogue_001" uri="./PublicationCatalog/Catalogue.xsd" />
- <system systemId="Catalogue.xsd" uri="./PublicationCatalog/Catalogue.xsd" />
- <uri name="http://www.eclipse.org/webtools/Catalogue.xsd" uri="http://www.eclipse.org/webtools/Catalogue/Catalogue.xsd" />
- <group id="group1" prefer="system">
- <public publicId="http://www.eclipse.org/webtools/Catalogue_002" uri="./PublicationCatalog/Catalogue.xsd" />
- </group>
- </catalog>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog2bak.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/catalog2bak.xml
deleted file mode 100644
index b0a5b23..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/catalog2bak.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
- <public publicId="http://www.eclipse.org/webtools/Catalogue" uri="./PublicationCatalog/Catalogue.xsd"/>
- <system systemId="Catalogue.xsd" uri="./PublicationCatalog/Catalogue.xsd"/>
- <group id="group1" prefer="system">
- <uri name="http://Catalogue.xsd" uri="http://www.eclipse.org/webtools/Catalogue/Catalogue.xsd"/>
- </group>
-</catalog>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/compatabilityTest.xmlcatalog b/tests/org.eclipse.wst.xml.catalog.tests/data/compatabilityTest.xmlcatalog
deleted file mode 100644
index a884551..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/compatabilityTest.xmlcatalog
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<XMLCatalogSettings>
- <UserEntries>
- <UserEntry TYPE="PUBLIC" ID="InvoiceId"
-URI="platform:/resource/XMLExamples/Invoice2/Invoice.dtd"/>
- </UserEntries>
-</XMLCatalogSettings>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/delegateAndRewrite/catalog.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/delegateAndRewrite/catalog.xml
deleted file mode 100644
index 7c794c5..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/delegateAndRewrite/catalog.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
- <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
- <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
- <delegatePublic publicIdStartString="ISO 8879:1986" catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
- <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
- <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file:///usr/share/sgml/docbook/xmlcatalog"/>
- <rewriteSystem systemIdStartString="http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd" rewritePrefix="/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd"/>
- <rewriteURI uriStartString="http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd" rewritePrefix="/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd"/>
-</catalog>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/docbook/xmlcatalog.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/docbook/xmlcatalog.xml
deleted file mode 100644
index d283dee..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/docbook/xmlcatalog.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
- <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-pub.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-grk1.ent"/>
- <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" uri="xml-dtd-4.1.2-1.0-17.2/dbpoolx.mod"/>
- <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-box.ent"/>
- <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" uri="xml-dtd-4.1.2-1.0-17.2/docbookx.dtd"/>
- <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-grk3.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-amsn.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-num.ent"/>
- <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" uri="xml-dtd-4.1.2-1.0-17.2/dbcentx.mod"/>
- <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-grk4.ent"/>
- <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" uri="xml-dtd-4.1.2-1.0-17.2/dbnotnx.mod"/>
- <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-dia.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-grk2.ent"/>
- <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" uri="xml-dtd-4.1.2-1.0-17.2/dbgenent.mod"/>
- <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" uri="xml-dtd-4.1.2-1.0-17.2/dbhierx.mod"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-amsa.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-amso.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-cyrl.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-tech.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-amsc.ent"/>
- <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="xml-dtd-4.2-1.0-17.2/soextblx.dtd"/>
- <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" uri="xml-dtd-4.1.2-1.0-17.2/calstblx.dtd"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-lat1.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-amsb.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-lat2.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-amsr.ent"/>
- <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="xml-dtd-4.2-1.0-17.2/ent/iso-cyr2.ent"/>
- <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1.2" rewritePrefix="xml-dtd-4.1.2-1.0-17.2"/>
- <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.1.2" rewritePrefix="xml-dtd-4.1.2-1.0-17.2"/>
- <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.2//EN" uri="xml-dtd-4.2-1.0-17.2/dbpoolx.mod"/>
- <public publicId="-//OASIS//DTD DocBook XML V4.2//EN" uri="xml-dtd-4.2-1.0-17.2/docbookx.dtd"/>
- <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.2//EN" uri="xml-dtd-4.2-1.0-17.2/dbcentx.mod"/>
- <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.2//EN" uri="xml-dtd-4.2-1.0-17.2/dbnotnx.mod"/>
- <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.2//EN" uri="xml-dtd-4.2-1.0-17.2/dbgenent.mod"/>
- <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.2//EN" uri="xml-dtd-4.2-1.0-17.2/dbhierx.mod"/>
- <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.2//EN" uri="xml-dtd-4.2-1.0-17.2/calstblx.dtd"/>
- <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2" rewritePrefix="xml-dtd-4.2-1.0-17.2"/>
- <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.2" rewritePrefix="xml-dtd-4.2-1.0-17.2"/>
-</catalog>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example-catalog.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/example-catalog.xml
deleted file mode 100644
index a67cd07..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example-catalog.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE catalog
- PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
- "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
- prefer="public">
- <uri name="http://apache.org/xml/xcatalog/example" uri="./example/example.xsd"/>
- <system systemId="myexample.xsd" uri="./example/example-nonamespace.xsd"/>
-
- <delegatePublic publicIdStartString="-//A//"
- catalog="example-catalog2.xml"/>
-
-
-</catalog>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example-catalog2.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/example-catalog2.xml
deleted file mode 100644
index 18bb1ef..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example-catalog2.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE catalog
- PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
- "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
- prefer="public">
- <public publicId="-//A//XML CATALOG IDENTIFIER//EN"
- uri="./example/example.ent"/>
-</catalog>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-dtd.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-dtd.xml
deleted file mode 100644
index 94aaae9..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-dtd.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE root [
- <!ENTITY text PUBLIC "-//A//XML CATALOG IDENTIFIER//EN"
- "urn:publicid:-:A:XML+CATALOG+IDENTIFIER:EN">
-]>
-<root>&text;</root>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-nonamespace.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-nonamespace.xsd
deleted file mode 100644
index ef2998d..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-nonamespace.xsd
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="root" type="xs:anyURI"/>
-</xs:schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-schema-nonamespace.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-schema-nonamespace.xml
deleted file mode 100644
index 39175f1..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-schema-nonamespace.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="myexample.xsd">
-http://apache.org/xml/anyURI</root>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-schema.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-schema.xml
deleted file mode 100644
index f97cb3b..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example-schema.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<root xmlns="http://apache.org/xml/xcatalog/example">
-http://apache.org/xml/anyURI</root>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example.ent b/tests/org.eclipse.wst.xml.catalog.tests/data/example/example.ent
deleted file mode 100644
index cd08755..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example.ent
+++ /dev/null
@@ -1 +0,0 @@
-Hello world!
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/example/example.xsd
deleted file mode 100644
index 41a29fe..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/example/example.xsd
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns="http://apache.org/xml/xcatalog/example"
- targetNamespace="http://apache.org/xml/xcatalog/example">
- <xs:element name="root" type="xs:anyURI"/>
-</xs:schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_mappedincluded.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_mappedincluded.xml
deleted file mode 100644
index bf127b1..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_mappedincluded.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE catalog
- PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
- "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
- prefer="public">
-
- <uri name="http://www.example.com/Report"
- uri="./PurchaseOrder/international/report_.xsd" />
- <!-- we can not map PublicId or URI of the included/redefined schemas -->
- <uri name="http://www.example.com/IPO"
- uri="./PurchaseOrder/international/ipo_.xsd" />
- <system systemId="address_.xsd"
- uri="./PurchaseOrder/international/address.xsd" />
-
-</catalog>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_public.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_public.xml
deleted file mode 100644
index 734ecba..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_public.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE catalog
- PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
- "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
- prefer="public">
-
- <uri name="http://www.example.com/Report"
- uri="./PurchaseOrder/international/report_.xsd" />
- <!-- we can not map PublicId or URI of the included/redefined schemas -->
- <uri name="http://www.example.com/IPO"
- uri="./PurchaseOrder/international/ipo.xsd" />
-
-
-
-</catalog>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_system.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_system.xml
deleted file mode 100644
index c66a1b9..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/report-catalog_system.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE catalog
- PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
- "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
-
- <uri name="http://www.example.com/Report"
- uri="./PurchaseOrder/international/report_.xsd" />
- <system systemId="ipo__.xsd"
- uri="./PurchaseOrder/international/ipo_.xsd" />
- <system systemId="address_.xsd"
- uri="./PurchaseOrder/international/address.xsd" />
-
-</catalog>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/schemas.jar b/tests/org.eclipse.wst.xml.catalog.tests/data/schemas.jar
deleted file mode 100644
index 9d1e4da..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/schemas.jar
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/catalog.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/catalog.xml
deleted file mode 100644
index 98b04a1..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/catalog.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" xml:base=".">
- <public publicId="myquote" uri="quote2.xml"/>
-</catalog>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/quote1.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/quote1.xml
deleted file mode 100644
index 1fcba52..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/quote1.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
- <!-- I belong to:
- org.apache.tools.ant.types.XMLCatalogBuildFileTest.java
- -->
-
-<para>
- A stitch in time saves nine
-</para>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/quote2.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/quote2.xml
deleted file mode 100644
index 10cd14e..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/quote2.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<para>
- No news is good news
-</para>
-
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog.xsl b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog.xsl
deleted file mode 100644
index e692b0e..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog.xsl
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:output method="text"/>
-
- <!-- name of the output parameter to write -->
- <xsl:param name="outprop">value</xsl:param>
-
- <xsl:strip-space elements="*"/>
-
- <xsl:template match="/">
- <xsl:value-of select="$outprop"/>: <xsl:apply-templates select="/fragment/para"/>
- </xsl:template>
-
- <!-- This will only be matched in doc2.xml -->
- <xsl:template match="Ref">
- <xsl:apply-templates select="document(@file)/fragment/para"/>
- </xsl:template>
-
- <!-- This will only be matched in doc1.xml -->
- <xsl:template match="text()">
- <xsl:value-of select="normalize-space(.)"/>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog1.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog1.xml
deleted file mode 100644
index 11c730d..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE fragment [
- <!ENTITY quote PUBLIC "myquote" "quote1.xml">
-]>
-
-<fragment>
- <para>
- "e;
- </para>
-</fragment>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml
deleted file mode 100644
index dd41d0b..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<fragment>
- <para>
- <Ref file="xmlcatalog1.xml"/>
- </para>
-</fragment>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-out b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-out
deleted file mode 100644
index e9d7fc5..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-out
+++ /dev/null
@@ -1 +0,0 @@
-testvalue: A stitch in time saves nine
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-out-diff b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-out-diff
deleted file mode 100644
index 987a5db..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-out-diff
+++ /dev/null
@@ -1,2 +0,0 @@
-<<<< testvalue: A stitch in time saves nine
-<<<< testvalue: No news is good news
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-result b/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-result
deleted file mode 100644
index 1de28a7..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/testXSLTwithCatalogResolver/xmlcatalog2.xml-result
+++ /dev/null
@@ -1 +0,0 @@
-testvalue: No news is good news
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/data/xsd/XSLSchema.xsd b/tests/org.eclipse.wst.xml.catalog.tests/data/xsd/XSLSchema.xsd
deleted file mode 100644
index e99645a..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/data/xsd/XSLSchema.xsd
+++ /dev/null
@@ -1,390 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/XSL/Transform">
- <!-- xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" /-->
-
- <xsd:element name="stylesheet" type="wrapper" />
- <xsd:element name="transform" type="wrapper" />
-
- <xsd:complexType name="wrapper">
- <xsd:group ref="topLevelElements" minOccurs="0" maxOccurs="unbounded" />
- <xsd:attribute name="extension-element-prefixes" type="xsd:string" use="optional" />
- <xsd:attribute name="exclude-result-prefixes" type="xsd:string" use="optional" />
- <xsd:attribute name="id" type="xsd:ID" use="optional" />
- <xsd:attribute name="version" type="xsd:NMTOKEN" use="optional" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
-
- <xsd:element name="import">
- <xsd:complexType>
- <xsd:attribute name="href" type="xsd:anyURI" use="required" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="include">
- <xsd:complexType>
- <xsd:attribute name="href" type="xsd:anyURI" use="required" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="strip-space">
- <xsd:complexType>
- <xsd:attribute name="elements" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="preserve-space">
- <xsd:complexType>
- <xsd:attribute name="elements" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="output">
- <xsd:complexType>
- <xsd:attribute name="method" use="optional">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="xml" />
- <xsd:enumeration value="html" />
- <xsd:enumeration value="text" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="version" type="xsd:NMTOKEN" use="optional" />
- <xsd:attribute name="encoding" type="xsd:NMTOKEN" use="optional" />
- <xsd:attribute name="omit-xml-declaration" use="optional" type="YesNoType" />
- <xsd:attribute name="standalone" use="optional" type="YesNoType" />
- <xsd:attribute name="doctype-public" type="xsd:string" use="optional" />
- <xsd:attribute name="doctype-system" type="xsd:string" use="optional" />
- <xsd:attribute name="cdata-section-elements" type="xsd:NMTOKENS" use="optional" />
- <xsd:attribute name="indent" use="optional" type="YesNoType" />
- <xsd:attribute name="media-type" type="xsd:string" use="optional" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="key">
- <xsd:complexType>
- <xsd:attribute name="name" type="xsd:NMTOKEN" use="required" />
- <xsd:attribute name="match" type="pattern" use="required" />
- <xsd:attribute name="use" type="expression" use="required" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="decimal-format">
- <xsd:complexType>
- <xsd:attribute name="name" type="xsd:NMTOKEN" use="optional" />
- <xsd:attribute default="." name="decimal-separator" type="xsd:string" />
- <xsd:attribute default="," name="grouping-separator" type="xsd:string" />
- <xsd:attribute default="Infinity" name="infinity" type="xsd:string" />
- <xsd:attribute default="-" name="minus-sign" type="xsd:string" />
- <xsd:attribute default="NaN" name="NaN" type="xsd:string" />
- <xsd:attribute default="%" name="percent" type="xsd:string" />
- <xsd:attribute default="‰" name="per-mille" type="xsd:string" />
- <xsd:attribute default="0" name="zero-digit" type="xsd:string" />
- <xsd:attribute default="#" name="digit" type="xsd:string" />
- <xsd:attribute default=";" name="pattern-separator" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="namespace-alias">
- <xsd:complexType>
- <xsd:attribute name="stylesheet-prefix" type="xsd:string" use="required" />
- <xsd:attribute name="result-prefix" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="template">
- <xsd:complexType mixed="true">
- <xsd:sequence>
- <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded" />
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="char-instructions"></xsd:group>
- <xsd:any namespace="##other" processContents="skip" />
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="match" type="pattern" use="optional" />
- <xsd:attribute name="name" type="xsd:NMTOKEN" use="optional" />
- <xsd:attribute name="priority" type="xsd:NMTOKEN" use="optional" />
- <xsd:attribute name="mode" type="xsd:NMTOKEN" use="optional" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="value-of">
- <xsd:complexType>
- <xsd:attributeGroup ref="select-required" />
- <xsd:attributeGroup ref="disable-output-escaping" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="copy-of">
- <xsd:complexType>
- <xsd:attributeGroup ref="select-required" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="number">
- <xsd:complexType>
- <xsd:attribute default="single" name="level">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="single" />
- <xsd:enumeration value="multiple" />
- <xsd:enumeration value="any" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="count" type="pattern" use="optional"/>
- <xsd:attribute name="from" type="pattern" use="optional"/>
- <xsd:attribute name="value" type="expression" use="optional"/>
- <xsd:attribute default="1" name="format" type="xsd:string" />
- <xsd:attribute name="lang" type="xsd:string" use="optional" />
- <xsd:attribute name="letter-value" type="xsd:string" use="optional" />
- <xsd:attribute name="grouping-separator" type="xsd:string" use="optional" />
- <xsd:attribute name="grouping-size" type="xsd:string" use="optional" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="apply-templates">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element ref="sort" />
- <xsd:element ref="with-param" />
- </xsd:choice>
- <xsd:attribute default="node()" name="select" type="expression" />
- <xsd:attribute name="mode" type="xsd:NMTOKEN" use="optional" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="apply-imports">
- <xsd:complexType />
- </xsd:element>
-
- <xsd:element name="for-each">
- <xsd:complexType mixed="true">
- <xsd:sequence>
- <xsd:element ref="sort" minOccurs="0" maxOccurs="unbounded" />
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="char-instructions"></xsd:group>
- <xsd:any namespace="##other" processContents="skip" />
- </xsd:choice>
- </xsd:sequence>
- <xsd:attributeGroup ref="select-required" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="sort">
- <xsd:complexType>
- <xsd:attribute default="." name="select" type="expression" />
- <xsd:attribute name="lang" type="xsd:string" use="optional" />
- <xsd:attribute default="text" name="data-type" type="xsd:string" />
- <xsd:attribute default="ascending" name="order" type="xsd:string" />
- <xsd:attribute name="case-order" type="xsd:string" use="optional" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="if">
- <xsd:complexType mixed="true">
- <xsd:group ref="instructions" minOccurs="0" maxOccurs="unbounded"></xsd:group>
- <xsd:attribute name="test" type="expression" use="required" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="choose">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="when" minOccurs="1" maxOccurs="unbounded" />
- <xsd:element ref="otherwise" minOccurs="0" />
- </xsd:sequence>
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="when">
- <xsd:complexType mixed="true">
- <xsd:group ref="instructions" minOccurs="0" maxOccurs="unbounded" />
- <xsd:attribute name="test" type="expression" use="required" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="otherwise">
- <xsd:complexType mixed="true">
- <xsd:group ref="instructions" minOccurs="0" maxOccurs="unbounded" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="attribute-set">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:NMTOKEN" use="required" />
- <xsd:attribute name="use-attribute-sets" type="xsd:NMTOKENS" use="optional" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="call-template">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="with-param" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:NMTOKEN" use="required" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="with-param" type="NamedAndSelectable" />
-
- <xsd:element name="variable" type="NamedAndSelectable" />
-
- <xsd:element name="param" type="NamedAndSelectable" />
-
- <xsd:element name="text">
- <xsd:complexType>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attributeGroup ref="disable-output-escaping" />
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="processing-instruction">
- <xsd:complexType mixed="true">
- <xsd:group ref="char-instructions"></xsd:group>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="element">
- <xsd:complexType mixed="true">
- <xsd:group ref="instructions"></xsd:group>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- <xsd:attribute name="namespace" type="xsd:string" use="optional" />
- <xsd:attributeGroup ref="use-attribute-sets" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="attribute">
- <xsd:complexType mixed="true">
- <xsd:group ref="char-instructions"/>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- <xsd:attribute name="namespace" type="xsd:string" use="optional" />
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="comment">
- <xsd:complexType mixed="true">
- <xsd:group ref="char-instructions"/>
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="copy">
- <xsd:complexType mixed="true">
- <xsd:group ref="instructions"/>
- <!-- xsd:attribute ref="xml:space" /-->
- <xsd:attributeGroup ref="use-attribute-sets" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="message">
- <xsd:complexType mixed="true">
- <xsd:group ref="char-instructions"/>
- <xsd:attribute default="no" name="terminate" type="YesNoType" />
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="fallback">
- <xsd:complexType mixed="true">
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:group ref="instructions"></xsd:group>
- </xsd:choice>
- <!-- xsd:attribute ref="xml:space" /-->
- </xsd:complexType>
- </xsd:element>
-
- <xsd:group name="instructions">
- <xsd:choice>
- <xsd:group ref="char-instructions"></xsd:group>
- <xsd:element ref="processing-instruction" />
- <xsd:element ref="comment" />
- <xsd:element ref="element" />
- <xsd:element ref="attribute" />
- </xsd:choice>
- </xsd:group>
-
- <xsd:group name="char-instructions">
- <xsd:choice>
- <xsd:element ref="apply-templates" />
- <xsd:element ref="call-template" />
- <xsd:element ref="apply-imports" />
- <xsd:element ref="for-each" />
- <xsd:element ref="value-of" />
- <xsd:element ref="copy-of" />
- <xsd:element ref="number" />
- <xsd:element ref="choose" />
- <xsd:element ref="if" />
- <xsd:element ref="text" />
- <xsd:element ref="copy" />
- <xsd:element ref="variable" />
- <xsd:element ref="message" />
- <xsd:element ref="fallback" />
- </xsd:choice>
- </xsd:group>
-
- <xsd:group name="topLevelElements">
- <xsd:choice>
- <xsd:element ref="import" />
- <xsd:element ref="include" />
- <xsd:element ref="strip-space" />
- <xsd:element ref="preserve-space" />
- <xsd:element ref="key" />
- <xsd:element ref="decimal-format" />
- <xsd:element ref="attribute-set" />
- <xsd:element ref="namespace-alias" />
- <xsd:element ref="param" />
- <xsd:element ref="variable" />
- <xsd:element ref="output" />
- <xsd:element ref="template" />
- </xsd:choice>
- </xsd:group>
-
- <xsd:simpleType name="YesNoType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="yes" />
- <xsd:enumeration value="no" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="NamedAndSelectable" mixed="true">
- <xsd:group ref="instructions" minOccurs="0" maxOccurs="unbounded" />
- <xsd:attribute name="name" type="xsd:NMTOKEN" use="required" />
- <xsd:attributeGroup ref="select-optional" />
- </xsd:complexType>
-
-
- <xsd:simpleType name="expression">
- <xsd:restriction base="xsd:string"></xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="pattern">
- <xsd:restriction base="xsd:string"></xsd:restriction>
- </xsd:simpleType>
-
- <xsd:attributeGroup name="select-optional">
- <xsd:attribute name="select" type="expression" />
- </xsd:attributeGroup>
- <xsd:attributeGroup name="select-required">
- <xsd:attribute name="select" type="expression" use="required" />
- </xsd:attributeGroup>
- <xsd:attributeGroup name="disable-output-escaping">
- <xsd:attribute name="disable-output-escaping" type="YesNoType" default="no" />
- </xsd:attributeGroup>
- <xsd:attributeGroup name="use-attribute-sets">
- <xsd:attribute name="use-attribute-sets" type="xsd:NMTOKENS" use="optional"/>
- </xsd:attributeGroup>
-
-</xsd:schema>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/plugin.xml b/tests/org.eclipse.wst.xml.catalog.tests/plugin.xml
deleted file mode 100644
index ca8ffe8..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.wst.xml.core.catalogContributions">
- <catalogContribution>
- <system id="testSystemId"
- systemId="http://personal/personal.dtd"
- uri="data/Personal/personal.dtd">
- </system>
- <public id="testPublicId1"
- publicId="InvoiceId_test"
- uri="data/Invoice/Invoice.dtd"
- webURL="http://org.eclipse.wst.xml.example/Invoice.dtd">
- </public>
- <uri id="testUriId1"
- name="http://apache.org/xml/xcatalog/example"
- uri="data/example/example.xsd"/>
- <uri id="testURIId2"
- name="http://www.w3.org/2001/XMLSchema"
- uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd">
- </uri>
- <uri id="testURIId3"
- name="http://oasis.names.tc.entity.xmlns.xml.catalog"
- uri="jar:platform:/plugin/org.eclipse.wst.xml.catalog.tests/data/schemas.jar!/data/catalog.xsd">
- </uri>
- <nextCatalog id="testNestedCatalog"
- catalog="data/catalog1.xml"/>
- </catalogContribution>
- </extension>
-
-
-</plugin>
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/AbstractCatalogTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/AbstractCatalogTest.java
deleted file mode 100644
index b045822..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/AbstractCatalogTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.CatalogContributorRegistryReader;
-import org.eclipse.wst.xml.core.internal.catalog.CatalogSet;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-import org.osgi.framework.Bundle;
-
-public abstract class AbstractCatalogTest extends TestCase
-{
- private CatalogSet catalogSet = new CatalogSet();
-
- protected ICatalog systemCatalog;
-
- protected ICatalog userCatalog;
-
- protected ICatalog defaultCatalog;
-
-
- public AbstractCatalogTest(String name)
- {
- super(name);
-
- }
-
- protected static List getCatalogEntries(ICatalog catalog, int entryType)
- {
- List result = new ArrayList();
- ICatalogEntry[] entries = catalog.getCatalogEntries();
- for (int i = 0; i < entries.length; i++)
- {
- ICatalogEntry entry = entries[i];
- if (entry.getEntryType() == entryType)
- {
- result.add(entry);
- }
- }
- return result;
- }
-
- protected ICatalog getCatalog(String id, String uriString) throws Exception
- {
- return catalogSet.lookupOrCreateCatalog(id, uriString);
- }
-
-
- public void initCatalogs()
- {
- defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
- INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
- for (int i = 0; i < nextCatalogs.length; i++)
- {
- INextCatalog catalog = nextCatalogs[i];
- ICatalog referencedCatalog = catalog.getReferencedCatalog();
- if (referencedCatalog != null)
- {
- if (XMLCorePlugin.SYSTEM_CATALOG_ID
- .equals(referencedCatalog.getId()))
- {
- systemCatalog = referencedCatalog;
- } else if (XMLCorePlugin.USER_CATALOG_ID
- .equals(referencedCatalog.getId()))
- {
- userCatalog = referencedCatalog;
- }
- }
- }
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
- initCatalogs();
- }
-
- protected static String makeAbsolute(String baseLocation, String location)
- {
- URL local = null;
- location = location.replace('\\', '/');
- try
- {
- URL baseURL = new URL(baseLocation);
- local = new URL(baseURL, location);
- } catch (MalformedURLException e)
- {
- }
-
- if (local != null)
- {
- return local.toString();
- } else
- {
- return location;
- }
- }
-
- protected static URL resolvePluginLocation(String pluginId){
- Bundle bundle = Platform.getBundle(pluginId);
- if (bundle != null)
- {
- URL bundleEntry = bundle.getEntry("/");
- try
- {
- return Platform.resolve(bundleEntry);
- } catch (IOException e)
- {
- e.printStackTrace();
- }
- }
- return null;
- }
-
- // see CatalogContributorRegistryReader.resolvePath(String path)
- protected String resolvePath(String pluginId, String path)
- {
-
- return CatalogContributorRegistryReader.resolvePath(
- CatalogContributorRegistryReader.getPlatformURL(pluginId), path);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/AllTests.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/AllTests.java
deleted file mode 100644
index 8c4bd78..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/AllTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.wst.xml.catalog.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(CatalogReaderTest.class);
- suite.addTestSuite(CatalogResolverTest.class);
- suite.addTestSuite(CatalogWriterTest.class);
- suite.addTestSuite(CatalogContributorRegistryReaderTest.class);
- suite.addTestSuite(CatalogTest.class);
- //$JUnit-END$
- return suite;
- }
-
-
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogContributorRegistryReaderTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogContributorRegistryReaderTest.java
deleted file mode 100644
index e5c80f7..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogContributorRegistryReaderTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-
-
-public class CatalogContributorRegistryReaderTest extends AbstractCatalogTest
-{
- protected void setUp() throws Exception
- {
- super.setUp();
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- public CatalogContributorRegistryReaderTest(String name)
- {
- super(name);
- }
-
- public final void testReadRegistry() throws Exception
- {
- assertNotNull(defaultCatalog);
- assertEquals(XMLCorePlugin.DEFAULT_CATALOG_ID, defaultCatalog.getId());
- assertEquals(2, defaultCatalog.getNextCatalogs().length);
-
- String pluginId = TestPlugin.getDefault().getBundle().getSymbolicName();
-
- // test system entries
- assertNotNull(systemCatalog);
- List entries = CatalogTest.getCatalogEntries(systemCatalog, ICatalogEntry.ENTRY_TYPE_SYSTEM);
- for (int i = 0; i < entries.size(); i++)
- {
- ICatalogEntry entry = (ICatalogEntry)entries.get(i);
- if("testSystemId".equals(entry.getId()))
- {
- String resolvedURI = resolvePath(pluginId, "data/Personal/personal.dtd");
- assertEquals(resolvedURI, entry.getURI());
- assertEquals("http://personal/personal.dtd", entry.getKey());
- }
- }
-
- // test public entries
- entries = CatalogTest.getCatalogEntries(systemCatalog, ICatalogEntry.ENTRY_TYPE_PUBLIC);
- for (int i = 0; i < entries.size(); i++)
- {
- ICatalogEntry entry = (ICatalogEntry)entries.get(i);
- if("testPublicId1".equals(entry.getId()))
- {
- String resolvedURI = resolvePath(pluginId, "data/Invoice/Invoice.dtd");
- assertEquals(resolvedURI, entry.getURI());
- assertEquals("InvoiceId_test", entry.getKey());
- // test user defined attributes
- assertEquals("http://org.eclipse.wst.xml.example/Invoice.dtd", entry.getAttributeValue("webURL"));
-
- }
-
- else if("testMappingInfo".equals(entry.getId()))
- {
- String resolvedURI = resolvePath(pluginId, "platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd");
- assertEquals(resolvedURI, entry.getURI());
- assertEquals("http://www.w3.org/2001/XMLSchema1", entry.getKey());
- }
-
- }
-
- // test uri entries
- entries = CatalogTest.getCatalogEntries(systemCatalog, ICatalogEntry.ENTRY_TYPE_URI);
- for (int i = 0; i < entries.size(); i++)
- {
- ICatalogEntry entry = (ICatalogEntry)entries.get(i);
- if("testURIId1".equals(entry.getId()))
- {
- String resolvedURI = resolvePath(pluginId, "data/example/example.xsd");
- assertEquals(resolvedURI, entry.getURI());
- assertEquals("http://apache.org/xml/xcatalog/example", entry.getKey());
- }
- else if("testURIId2".equals(entry.getId()))
- {
- String resolvedURI = resolvePath(pluginId, "platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd");
- assertEquals(resolvedURI, entry.getURI());
- assertEquals("http://www.w3.org/2001/XMLSchema", entry.getKey());
- }
- else if("testURIId3".equals(entry.getId()))
- {
- String resolvedURI = resolvePath(pluginId, "jar:platform:/plugin/org.eclipse.wst.xml.catalog.tests/data/schemas.jar!/data/catalog.xsd");
- assertEquals(resolvedURI, entry.getURI());
- assertEquals("http://oasis.names.tc.entity.xmlns.xml.catalog", entry.getKey());
- }
- }
-
- // test tested catalog
- INextCatalog[] nextCatalogEntries = systemCatalog.getNextCatalogs();
- for (int i = 0; i < nextCatalogEntries.length; i++)
- {
- INextCatalog nextCatalogEntry = (INextCatalog) nextCatalogEntries[i];
- if("testNestedCatalog".equals(nextCatalogEntry.getId()))
- {
- String resolvedURI = resolvePath(pluginId, "data/catalog1.xml");
- assertEquals(resolvedURI, nextCatalogEntry.getCatalogLocation());
- ICatalog nextCatalog = nextCatalogEntry.getReferencedCatalog();
- assertNotNull(nextCatalog);
- assertEquals(3, nextCatalog.getCatalogEntries().length);
- // test public entries
- entries = CatalogTest.getCatalogEntries(nextCatalog,
- ICatalogEntry.ENTRY_TYPE_PUBLIC);
- assertEquals(1, entries.size());
- ICatalogEntry entry = (ICatalogEntry) entries.get(0);
- //URI uri = URIHelper.getURIForFilePath(resolvedURI);
- //resolvedURI = URIHelper.makeAbsolute(uri.toURL(), "./Invoice/Invoice.dtd");
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("InvoiceId_test", entry.getKey());
- // test system entries
- entries = CatalogTest.getCatalogEntries(nextCatalog,
- ICatalogEntry.ENTRY_TYPE_SYSTEM);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry) entries.get(0);
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("Invoice.dtd", entry.getKey());
- // test uri entries
- entries = CatalogTest.getCatalogEntries(nextCatalog,
- ICatalogEntry.ENTRY_TYPE_URI);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry) entries.get(0);
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("http://www.test.com/Invoice.dtd", entry.getKey());
- }
- }
- }
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogReaderTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogReaderTest.java
deleted file mode 100644
index 079355e..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogReaderTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import java.net.URL;
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.xml.core.internal.catalog.Catalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-
-public class CatalogReaderTest extends AbstractCatalogTest {
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public CatalogReaderTest(String name) {
- super(name);
- }
-
-
- /*
- * Class under test for void read(ICatalog, String)
- */
- public void testReadCatalog()throws Exception {
-
- //read catalog
- String catalogFile = "/data/catalog1.xml";
- URL catalogUrl = TestPlugin.getDefault().getBundle().getEntry(catalogFile);
- assertNotNull(catalogUrl);
- URL base = Platform.resolve(catalogUrl);
-
- Catalog catalog = (Catalog)getCatalog("catalog1", base.toString());
- //CatalogReader.read(catalog, catalogFilePath);
- assertNotNull(catalog);
-
- // test main catalog - catalog1.xml
- //assertEquals("cat1", catalog.getId());
- assertEquals(3, catalog.getCatalogEntries().length);
-
- // test public entries
- List entries = CatalogTest.getCatalogEntries(catalog, ICatalogEntry.ENTRY_TYPE_PUBLIC);
- assertEquals(1, entries.size());
- ICatalogEntry entry = (ICatalogEntry)entries.get(0);
- //String resolvedURI = URIHelper.makeAbsolute(base, "./Invoice/Invoice.dtd");
-
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("InvoiceId_test", entry.getKey());
- assertEquals("http://webURL", entry.getAttributeValue("webURL"));
-
-
- // test system entries
- entries = CatalogTest.getCatalogEntries(catalog, ICatalogEntry.ENTRY_TYPE_SYSTEM);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry)entries.get(0);
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("Invoice.dtd", entry.getKey());
- assertEquals("yes", entry.getAttributeValue("chached"));
- assertEquals("value1", entry.getAttributeValue("property"));
-
-
- // test uri entries
- entries = CatalogTest.getCatalogEntries(catalog, ICatalogEntry.ENTRY_TYPE_URI);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry)entries.get(0);
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("http://www.test.com/Invoice.dtd", entry.getKey());
- assertEquals("no", entry.getAttributeValue("chached"));
- assertEquals("value2", entry.getAttributeValue("property"));
-
- // test next catalog - catalog2.xml
- INextCatalog[] nextCatalogEntries = catalog.getNextCatalogs();
- assertEquals(1, nextCatalogEntries.length);
-
- INextCatalog nextCatalogEntry = (INextCatalog)nextCatalogEntries[0];
- assertNotNull(nextCatalogEntry);
-
-// String catalogRefId = nextCatalogEntry.getCatalogRefId();
-// assertEquals("nextCatalog1", catalogRefId);
- //resolvedURI = URIHelper.makeAbsolute(base, "catalog2.xml");
- assertEquals("catalog2.xml", nextCatalogEntry.getCatalogLocation());
-
- ICatalog nextCatalog = nextCatalogEntry.getReferencedCatalog();
-
- assertNotNull(nextCatalog);
- assertEquals(4, nextCatalog.getCatalogEntries().length);
-
- // test public entries
- entries = CatalogTest.getCatalogEntries(nextCatalog, ICatalogEntry.ENTRY_TYPE_PUBLIC);
- assertEquals(2, entries.size());
- entry = (ICatalogEntry)entries.get(0);
- //resolvedURI = URIHelper.makeAbsolute(nextCatalog.getBase(), "./PublicationCatalog/Catalogue.xsd");
- assertEquals("./PublicationCatalog/Catalogue.xsd", entry.getURI());
- assertEquals("http://www.eclipse.org/webtools/Catalogue_001", entry.getKey());
-
- // test public entry from a group
- entry = (ICatalogEntry)entries.get(1);
- //resolvedURI = URIHelper.makeAbsolute(nextCatalog.getBase(), "./PublicationCatalog/Catalogue.xsd");
- assertEquals("./PublicationCatalog/Catalogue.xsd", entry.getURI());
- assertEquals("http://www.eclipse.org/webtools/Catalogue_002", entry.getKey());
-
- // test system entries
- entries = CatalogTest.getCatalogEntries(nextCatalog, ICatalogEntry.ENTRY_TYPE_SYSTEM);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry)entries.get(0);
- assertEquals("./PublicationCatalog/Catalogue.xsd", entry.getURI());
- assertEquals("Catalogue.xsd", entry.getKey());
- // test uri entries
- entries = CatalogTest.getCatalogEntries(nextCatalog, ICatalogEntry.ENTRY_TYPE_URI);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry)entries.get(0);
- assertEquals("http://www.eclipse.org/webtools/Catalogue/Catalogue.xsd", entry.getURI());
- assertEquals("http://www.eclipse.org/webtools/Catalogue.xsd", entry.getKey());
-
-
- }
-
- public void testCompatabilityReader() throws Exception {
- // read catalog
- String catalogFile = "/data/compatabilityTest.xmlcatalog";
- URL catalogUrl = TestPlugin.getDefault().getBundle().getEntry(catalogFile);
- assertNotNull(catalogUrl);
- URL base = Platform.resolve(catalogUrl);
-
- Catalog catalog = (Catalog)getCatalog("compatabilityCatalog", base.toString());
- //CatalogReader.read(catalog, catalogFilePath);
- assertNotNull(catalog);
- List entries = CatalogTest.getCatalogEntries(catalog, ICatalogEntry.ENTRY_TYPE_PUBLIC);
- assertEquals(1, entries.size());
- ICatalogEntry entry = (ICatalogEntry)entries.get(0);
- assertEquals("platform:/resource/XMLExamples/Invoice2/Invoice.dtd", entry.getURI());
- assertEquals("InvoiceId", entry.getKey());
- }
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogResolverTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogResolverTest.java
deleted file mode 100644
index 222cbb7..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogResolverTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-
-public class CatalogResolverTest extends AbstractCatalogTest {
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public CatalogResolverTest(String name) {
- super(name);
- }
-
- public final void testResolveResolver() throws Exception {
-
-
- // from plugin.xml file
- String pluginBase = resolvePluginLocation(TestPlugin.getDefault().getBundle().getSymbolicName()).toString();
-
- String resolvedActual = defaultCatalog.resolvePublic("InvoiceId_test", null);
- String resolvedURI = makeAbsolute(pluginBase, "data/Invoice/Invoice.dtd");
- assertEquals(resolvedURI, resolvedActual);
- resolvedActual = defaultCatalog.resolveSystem("http://personal/personal.dtd");
- resolvedURI = makeAbsolute(pluginBase, "data/Personal/personal.dtd");
- assertEquals(resolvedURI, resolvedActual);
- resolvedActual = defaultCatalog.resolveURI("http://apache.org/xml/xcatalog/example");
- resolvedURI = makeAbsolute(pluginBase, "data/example/example.xsd");
- assertEquals(resolvedURI, resolvedActual);
- resolvedActual = defaultCatalog.resolveURI("http://www.w3.org/2001/XMLSchema");
- resolvedURI = resolvePath("", "platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd");
- resolvedURI = makeAbsolute(pluginBase, resolvedURI);
- assertEquals(resolvedURI, resolvedActual);
-
- // from catalog1.xml
- resolvedActual = defaultCatalog.resolvePublic("InvoiceId_test", null);
- resolvedURI = makeAbsolute(pluginBase, "data/Invoice/Invoice.dtd");
- assertEquals(resolvedURI, resolvedActual);
-
- resolvedActual = defaultCatalog.resolveSystem("Invoice.dtd");
- resolvedURI = makeAbsolute(pluginBase, "data/Invoice/Invoice.dtd");
- assertEquals(resolvedURI, resolvedActual);
-
- resolvedActual = defaultCatalog.resolveURI("http://www.test.com/Invoice.dtd");
- resolvedURI = makeAbsolute(pluginBase, "data/Invoice/Invoice.dtd");
- assertEquals(resolvedURI, resolvedActual);
-
-
- // from catalog2.xml
- resolvedActual = defaultCatalog.resolvePublic("http://www.eclipse.org/webtools/Catalogue_001", null);
- resolvedURI = makeAbsolute(pluginBase, "data/PublicationCatalog/Catalogue.xsd");
- assertEquals(resolvedURI, resolvedActual);
-
- resolvedActual = defaultCatalog.resolvePublic("http://www.eclipse.org/webtools/Catalogue_002", null);
- resolvedURI = makeAbsolute(pluginBase, "data/PublicationCatalog/Catalogue.xsd");
- assertEquals(resolvedURI, resolvedActual);
-
- resolvedActual = defaultCatalog.resolveSystem("Catalogue.xsd");
- resolvedURI = makeAbsolute(pluginBase, "data/PublicationCatalog/Catalogue.xsd");
- assertEquals(resolvedURI, resolvedActual);
-
- resolvedActual = defaultCatalog.resolveURI("http://Catalogue.xsd");
- resolvedURI = "http://www.eclipse.org/webtools/Catalogue.xsd";
- assertEquals(resolvedURI, resolvedURI);
-
-
- }
-
-
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogTest.java
deleted file mode 100644
index 57ec343..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.Catalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-
-
-
-public class CatalogTest extends AbstractCatalogTest {
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public CatalogTest(String name) {
- super(name);
- }
-
- public void testCatalog() throws Exception
- {
- Catalog workingUserCatalog = new Catalog(null, "working", null);
- assertNotNull(userCatalog);
- workingUserCatalog.addEntriesFromCatalog(userCatalog);
-
- ICatalogEntry catalogEntry = (ICatalogEntry)userCatalog.createCatalogElement(ICatalogEntry.ENTRY_TYPE_PUBLIC);
- catalogEntry.setKey("testKey");
- catalogEntry.setURI("http://testuri");
- workingUserCatalog.addCatalogElement(catalogEntry);
-
- userCatalog.addEntriesFromCatalog(workingUserCatalog);
- String userCatalogLocation = userCatalog.getLocation();
-
- userCatalog.save();
- userCatalog.clear();
-
- userCatalog = getCatalog(XMLCorePlugin.USER_CATALOG_ID, userCatalogLocation);
-
- List entries = getCatalogEntries(userCatalog, ICatalogEntry.ENTRY_TYPE_PUBLIC);
- assertEquals(1, entries.size());
- ICatalogEntry entry = (ICatalogEntry)entries.get(0);
-
- assertEquals("http://testuri", entry.getURI());
- assertEquals("testKey", entry.getKey());
-
-
- }
-
-
-
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogWriterTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogWriterTest.java
deleted file mode 100644
index cfdab44..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/CatalogWriterTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import java.net.URL;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.xml.core.internal.catalog.Catalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-public class CatalogWriterTest extends AbstractCatalogTest {
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public CatalogWriterTest(String name) {
- super(name);
- }
-
- public final void testWrite() throws Exception {
-
- // read catalog
- String catalogFile = "/data/catalog1.xml";
- URL catalogUrl = TestPlugin.getDefault().getBundle().getEntry(
- catalogFile);
- assertNotNull(catalogUrl);
- URL resolvedURL = Platform.resolve(catalogUrl);
-
- Catalog testCatalog = (Catalog) getCatalog("catalog1", resolvedURL
- .toString());
- assertNotNull(testCatalog);
- testCatalog.setBase(resolvedURL.toString());
- // CatalogReader.read(testCatalog, resolvedURL.getFile());
- assertNotNull(testCatalog);
-
- // write catalog
- URL resultsFolder = TestPlugin.getDefault().getBundle().getEntry(
- "/");
- IPath path = new Path(Platform.resolve(resultsFolder).getFile());
- String resultCatalogFile = path.append("actual_results/catalog1.xml").toFile().toURI().toString();
- testCatalog.setLocation(resultCatalogFile);
- // write catalog
- testCatalog.save();
-
- // read catalog file from the saved location and test its content
- Catalog catalog = (Catalog) getCatalog("catalog2", testCatalog.getLocation());
- assertNotNull(catalog);
-
- // test saved catalog - catalog1.xml
- assertEquals(3, catalog.getCatalogEntries().length);
-
- // test public entries
- List entries = CatalogTest.getCatalogEntries(catalog,
- ICatalogEntry.ENTRY_TYPE_PUBLIC);
- assertEquals(1, entries.size());
- ICatalogEntry entry = (ICatalogEntry) entries.get(0);
-
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("InvoiceId_test", entry.getKey());
- assertEquals("http://webURL", entry.getAttributeValue("webURL"));
-
- // test system entries
- entries = CatalogTest.getCatalogEntries(catalog,
- ICatalogEntry.ENTRY_TYPE_SYSTEM);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry) entries.get(0);
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("Invoice.dtd", entry.getKey());
- assertEquals("yes", entry.getAttributeValue("chached"));
- assertEquals("value1", entry.getAttributeValue("property"));
-
- // test uri entries
- entries = CatalogTest.getCatalogEntries(catalog,
- ICatalogEntry.ENTRY_TYPE_URI);
- assertEquals(1, entries.size());
- entry = (ICatalogEntry) entries.get(0);
- assertEquals("./Invoice/Invoice.dtd", entry.getURI());
- assertEquals("http://www.test.com/Invoice.dtd", entry.getKey());
- assertEquals("no", entry.getAttributeValue("chached"));
- assertEquals("value2", entry.getAttributeValue("property"));
-
- // test next catalog - catalog2.xml
- INextCatalog[] nextCatalogEntries = catalog.getNextCatalogs();
- assertEquals(1, nextCatalogEntries.length);
-
- INextCatalog nextCatalogEntry = (INextCatalog) nextCatalogEntries[0];
- assertNotNull(nextCatalogEntry);
-
- assertEquals("catalog2.xml", nextCatalogEntry.getCatalogLocation());
- }
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/TestPlugin.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/TestPlugin.java
deleted file mode 100644
index 4e42219..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/TestPlugin.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class TestPlugin extends Plugin {
- //The shared instance.
- private static TestPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public TestPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static TestPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = TestPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.wst.xml.catalog.test.TestPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
-
- public static String resolvePluginLocation(String path) throws IOException {
- URL url = getDefault().getBundle().getEntry(path);
- url = Platform.resolve(url);
- return url.getFile();
- }
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/XSDSchemaTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/XSDSchemaTest.java
deleted file mode 100644
index 4bb55b8..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/XSDSchemaTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import org.eclipse.xsd.impl.XSDSchemaImpl;
-
-import junit.framework.TestCase;
-
-public class XSDSchemaTest extends TestCase {
-
- public static void main(String[] args) {
- }
-
- public void testSchemaForSchema(){
-
- XSDSchemaImpl.getSchemaForSchema("http://www.w3.org/2001/XMLSchema");
- }
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/ZipTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/ZipTest.java
deleted file mode 100644
index dca8739..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/catalog/tests/internal/ZipTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.wst.xml.catalog.tests.internal;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-public class ZipTest extends TestCase {
-
- public void testZip() throws Exception{
-
- URL url = new URL("jar:file:/D:/tcs/catalogJarTest/schemas.jar!/data/catalog.xsd");
- InputStream is = url.openStream();
- }
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/FileUtil.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/FileUtil.java
deleted file mode 100644
index e5ef8d0..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/FileUtil.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.eclipse.wst.xml.resolver.tools.tests.internal;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.InputStream;
-import java.io.PrintWriter;
-
-public class FileUtil {
-
- public FileUtil() {
- super();
- }
-
- public static void copyFile(String src, String dest) {
- InputStream is = null;
- FileOutputStream fos = null;
- try {
- is = new FileInputStream(src);
- fos = new FileOutputStream(dest);
- int c = 0;
- byte[] array = new byte[1024];
- while ((c = is.read(array)) >= 0) {
- fos.write(array, 0, c);
- }
- } catch (Exception e) {
- } finally {
- try {
- fos.close();
- is.close();
- } catch (Exception e) {
- }
- }
- }
-
- public static File createFileAndParentDirectories(String fileName)
- throws Exception {
- File file = new File(fileName);
- File parent = file.getParentFile();
- if (!parent.exists()) {
- parent.mkdirs();
- }
- file.createNewFile();
- return file;
- }
-
- public static void deleteDirectories(File dir)
- throws Exception {
-
- File[] children = dir.listFiles();
- for(int i=0; i< children.length; i++){
- if(children[i].list() != null && children[i].list().length > 0){
- deleteDirectories(children[i]);
- }
- else{
- children[i].delete();
- }
- }
- dir.delete();
-
- }
-
- public static boolean textualCompare(final File first, final File second, File diff) throws java.io.IOException {
- BufferedReader r1 = new BufferedReader(new FileReader(first));
- BufferedReader r2 = new BufferedReader(new FileReader(second));
- PrintWriter printWriter = new PrintWriter(new FileOutputStream(diff));
-
- boolean diffFound = false;
- while (r1.ready()) {
- String s1 = r1.readLine();
- String s2 = r2.readLine();
- if (s1 == null) {
- if (s2 == null)
- return diffFound; // files equal
- else
- diffFound = true; // files differ in length
- }
- if (!s1.equals(s2)) {
- printWriter.println("<<<< " + s1);
- printWriter.println("<<<< " + s2);
- diffFound = true; // files differ
- }
- }
-
- printWriter.flush();
-
- return diffFound;
-
- }
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/ResolvingXMLParser.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/ResolvingXMLParser.java
deleted file mode 100644
index 389d001..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/ResolvingXMLParser.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package org.eclipse.wst.xml.resolver.tools.tests.internal;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Vector;
-
-import org.apache.xml.resolver.CatalogManager;
-import org.apache.xml.resolver.apps.XParseError;
-import org.apache.xml.resolver.tools.ResolvingXMLReader;
-
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-public class ResolvingXMLParser {
-
- public boolean validationError = false;
-
- protected static int maxErrs = 10;
-
- protected static boolean nsAware = true;
-
- protected static boolean validating = true;
-
- protected static boolean showErrors = true;
-
- protected static boolean showWarnings = true;
-
- protected static Vector catalogFiles = new Vector();
-
- protected void parseAndValidate(String xmlFile, String[] catalogs)
- throws MalformedURLException, FileNotFoundException, IOException {
-
- CatalogManager myManager = new CatalogManager();
- StringBuffer catalogFile = new StringBuffer();
- for(int i=0; i<catalogs.length; i++){
- catalogFile = catalogFile.append(catalogs[i] + ";");
- }
- myManager.setCatalogFiles(catalogFile.toString());
- myManager.setIgnoreMissingProperties(true);
- myManager.setVerbosity(2);
- ResolvingXMLReader reader = new ResolvingXMLReader(myManager);
- try {
- reader.setFeature("http://xml.org/sax/features/namespaces",
- nsAware);
- reader.setFeature("http://xml.org/sax/features/validation",
- validating);
- reader.setFeature(
- "http://apache.org/xml/features/validation/schema", true);
- } catch (SAXNotRecognizedException e1) {
- e1.printStackTrace();
- } catch (SAXNotSupportedException e1) {
- e1.printStackTrace();
- }
-
- XParseError xpe = new XParseError(showErrors, showWarnings);
- xpe.setMaxMessages(maxErrs);
- reader.setErrorHandler(xpe);
-
- String parseType = validating ? "validating" : "well-formed";
- String nsType = nsAware ? "namespace-aware" : "namespace-ignorant";
- if (maxErrs > 0) {
- System.out.println("Attempting " + parseType + ", " + nsType
- + " parse");
- }
-
- try {
- reader.parse(xmlFile);
- } catch (Exception e) {
- validationError = true;
- e.printStackTrace();
- }
-
- if (maxErrs > 0) {
- System.out.print("Parse ");
- if (xpe.getFatalCount() > 0) {
- validationError = true;
- System.out.print("failed ");
- } else {
- System.out.print("succeeded ");
- System.out.print("(");
- }
- System.out.print("with ");
-
- int errCount = xpe.getErrorCount();
- int warnCount = xpe.getWarningCount();
-
- if (errCount > 0) {
- validationError = true;
- System.out.print(errCount + " error");
- System.out.print(errCount > 1 ? "s" : "");
- System.out.print(" and ");
- } else {
- System.out.print("no errors and ");
- }
-
- if (warnCount > 0) {
- validationError = true;
- System.out.print(warnCount + " warning");
- System.out.print(warnCount > 1 ? "s" : "");
- System.out.print(".");
- } else {
- System.out.print("no warnings.");
- }
-
- System.out.println("");
- }
- }
-
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/TraXLiaison.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/TraXLiaison.java
deleted file mode 100644
index 46861c2..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/TraXLiaison.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Ant", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.eclipse.wst.xml.resolver.tools.tests.internal;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.XMLReader;
-
-import javax.xml.parsers.SAXParserFactory;
-
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.Templates;
-
-import javax.xml.transform.ErrorListener;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.transform.Source;
-import javax.xml.transform.URIResolver;
-
-import javax.xml.transform.sax.SAXSource;
-
-/**
- * Concrete liaison for XSLT processor implementing TraX. (ie JAXP 1.1)
- *
- * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
- * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
- * @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
- * @since Ant 1.3
- */
-public class TraXLiaison implements XSLTLiaison, ErrorListener {
-
- /** The trax TransformerFactory */
- private TransformerFactory tfactory = null;
-
- /** stylesheet stream, close it asap */
- private FileInputStream xslStream = null;
-
- /** Stylesheet template */
- private Templates templates = null;
-
- /** transformer */
- private Transformer transformer = null;
-
- /** possible resolver for publicIds */
- private EntityResolver entityResolver;
-
- /** possible resolver for URIs */
- private URIResolver uriResolver;
-
- public TraXLiaison() throws Exception {
- tfactory = TransformerFactory.newInstance();
- tfactory.setErrorListener(this);
- }
-
- /**
- * Set the output property for the current transformer.
- * Note that the stylesheet must be set prior to calling
- * this method.
- * @param name the output property name.
- * @param value the output property value.
- */
- public void setOutputProperty(String name, String value) {
- if (transformer == null) {
- throw new IllegalStateException("stylesheet must be set prior to setting the output properties");
- }
- transformer.setOutputProperty(name, value);
- }
-
- //------------------- IMPORTANT
- // 1) Don't use the StreamSource(File) ctor. It won't work with
- // xalan prior to 2.2 because of systemid bugs.
-
- // 2) Use a stream so that you can close it yourself quickly
- // and avoid keeping the handle until the object is garbaged.
- // (always keep control), otherwise you won't be able to delete
- // the file quickly on windows.
-
- // 3) Always set the systemid to the source for imports, includes...
- // in xsl and xml...
-
- public void setStylesheet(File stylesheet) throws Exception {
- xslStream = new FileInputStream(stylesheet);
- StreamSource src = new StreamSource(xslStream);
- src.setSystemId(getSystemId(stylesheet));
- templates = tfactory.newTemplates(src);
- transformer = templates.newTransformer();
- transformer.setErrorListener(this);
- }
-
- public void transform(File infile, File outfile) throws Exception {
- FileInputStream fis = null;
- FileOutputStream fos = null;
- try {
- fis = new FileInputStream(infile);
- fos = new FileOutputStream(outfile);
- // FIXME: need to use a SAXSource as the source for the transform
- // so we can plug in our own entity resolver
- Source src = null;
- if (entityResolver != null) {
- if (tfactory.getFeature(SAXSource.FEATURE)) {
- SAXParserFactory spFactory = SAXParserFactory.newInstance();
- spFactory.setNamespaceAware(true);
- XMLReader reader = spFactory.newSAXParser().getXMLReader();
- reader.setEntityResolver(entityResolver);
- src = new SAXSource(reader, new InputSource(fis));
- } else {
- throw new IllegalStateException(
- "xcatalog specified, but "
- + "parser doesn't support SAX");
- }
- } else {
- src = new StreamSource(fis);
- }
- src.setSystemId(getSystemId(infile));
- StreamResult res = new StreamResult(fos);
- // not sure what could be the need of this...
- res.setSystemId(getSystemId(outfile));
-
- if (uriResolver != null)
- transformer.setURIResolver(uriResolver);
-
- transformer.transform(src, res);
- } finally {
- // make sure to close all handles, otherwise the garbage
- // collector will close them...whenever possible and
- // Windows may complain about not being able to delete files.
- try {
- if (xslStream != null) {
- xslStream.close();
- }
- } catch (IOException ignored) {
- }
- try {
- if (fis != null) {
- fis.close();
- }
- } catch (IOException ignored) {
- }
- try {
- if (fos != null) {
- fos.close();
- }
- } catch (IOException ignored) {
- }
- }
- }
-
- // make sure that the systemid is made of '/' and not '\' otherwise
- // crimson will complain that it cannot resolve relative entities
- // because it grabs the base uri via lastIndexOf('/') without
- // making sure it is really a /'ed path
- protected String getSystemId(File file) {
- String path = file.getAbsolutePath();
- path = path.replace('\\', '/');
-
- // on Windows, use 'file:///'
- if (File.separatorChar == '\\') {
- return FILE_PROTOCOL_PREFIX + "/" + path;
- }
- // Unix, use 'file://'
- return FILE_PROTOCOL_PREFIX + path;
- }
-
- public void addParam(String name, String value) {
- transformer.setParameter(name, value);
- }
-
- public void error(TransformerException e) {
- logError(e, "Error");
- }
-
- public void fatalError(TransformerException e) {
- logError(e, "Fatal Error");
- }
-
- public void warning(TransformerException e) {
- logError(e, "Warning");
- }
-
- private void logError(TransformerException e, String type) {
-
- StringBuffer msg = new StringBuffer();
- if (e.getLocator() != null) {
- if (e.getLocator().getSystemId() != null) {
- String url = e.getLocator().getSystemId();
- if (url.startsWith("file:///")) {
- url = url.substring(8);
- }
- msg.append(url);
- } else {
- msg.append("Unknown file");
- }
- if (e.getLocator().getLineNumber() != -1) {
- msg.append(":" + e.getLocator().getLineNumber());
- if (e.getLocator().getColumnNumber() != -1) {
- msg.append(":" + e.getLocator().getColumnNumber());
- }
- }
- }
- msg.append(": " + type + "! ");
- msg.append(e.getMessage());
- if (e.getCause() != null) {
- msg.append(" Cause: " + e.getCause());
- }
-
- System.out.println(msg.toString());
- }
-
- /** Set the class to resolve entities during the transformation
- */
- public void setEntityResolver(EntityResolver aResolver) {
- entityResolver = aResolver;
- }
-
- /** Set the class to resolve URIs during the transformation
- */
- public void setURIResolver(URIResolver aResolver) {
- uriResolver = aResolver;
- tfactory.setURIResolver(aResolver);
- }
-
-} //-- TraXLiaison
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/ValidatorTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/ValidatorTest.java
deleted file mode 100644
index 45e7ac9..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/ValidatorTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.wst.xml.resolver.tools.tests.internal;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.wst.xml.catalog.tests.internal.TestPlugin;
-
-
-/**
- * To run this test need to add resolver.jar to the classpath.
- * Run as JUnit Plugin test:
- * - put resolver.jar on the boot class path
- * - add VM argument:
- *
- * -Xbootclasspath/p:<install location>\jre\lib\ext\resolver.jar
- *
- *
- */
-public class ValidatorTest extends TestCase {
-
-
-
- protected void setUp() throws Exception {
- super.setUp();
-
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public ValidatorTest(String name) {
- super(name);
- }
-
-
- public void testValidatingParser() throws IOException {
- String xmlFile = "/data/Personal/personal-schema.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/catalog2.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- ResolvingXMLParser parser = new ResolvingXMLParser();
- parser.parseAndValidate(xmlFile, new String[]{catalogFile});
- assertFalse(parser.validationError);
- }
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/XSLTLiaison.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/XSLTLiaison.java
deleted file mode 100644
index 7bf36a8..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/XSLTLiaison.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Ant", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.eclipse.wst.xml.resolver.tools.tests.internal;
-
-import java.io.File;
-
-/**
- * Proxy interface for XSLT processors.
- *
- * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
- * @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
- * @see XSLTProcess
- * @since Ant 1.1
- */
-public interface XSLTLiaison {
-
- /**
- * the file protocol prefix for systemid.
- * This file protocol must be appended to an absolute path.
- * Typically: <tt>FILE_PROTOCOL_PREFIX + file.getAbsolutePath()</tt>
- * Note that on Windows, an extra '/' must be appended to the
- * protocol prefix so that there is always 3 consecutive slashes.
- * @since Ant 1.4
- */
- String FILE_PROTOCOL_PREFIX = "file://";
-
- /**
- * set the stylesheet to use for the transformation.
- * @param stylesheet the stylesheet to be used for transformation.
- * @since Ant 1.4
- */
- void setStylesheet(File stylesheet) throws Exception;
-
- /**
- * Add a parameter to be set during the XSL transformation.
- * @param name the parameter name.
- * @param expression the parameter value as an expression string.
- * @throws Exception thrown if any problems happens.
- * @since Ant 1.3
- */
- void addParam(String name, String expression) throws Exception;
-
- /**
- * Perform the transformation of a file into another.
- * @param infile the input file, probably an XML one. :-)
- * @param outfile the output file resulting from the transformation
- * @throws Exception thrown if any problems happens.
- * @see #setStylesheet(File)
- * @since Ant 1.4
- */
- void transform(File infile, File outfile) throws Exception;
-
-} //-- XSLTLiaison
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/XSLTWithCatalogResolverTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/XSLTWithCatalogResolverTest.java
deleted file mode 100644
index 4cfb3ad..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/resolver/tools/tests/internal/XSLTWithCatalogResolverTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.wst.xml.resolver.tools.tests.internal;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.xml.resolver.tools.CatalogResolver;
-import org.eclipse.wst.xml.catalog.tests.internal.TestPlugin;
-
-
-/**
- * Test from http://issues.apache.org/bugzilla/show_bug.cgi?id=16336
- *
- * To run this test need to add resolver.jar to the classpath.
- * Run as JUnit Plugin test:
- * - put resolver.jar on the boot class path
- * - add VM argument:
- *
- * -Xbootclasspath/p:<install location>\jre\lib\ext\resolver.jar
- *
- *
- */
-public class XSLTWithCatalogResolverTest extends TestCase {
-
- CatalogResolver catalogResolver = null;
- TraXLiaison xsltLiason = null;
- static String SEP = File.separator;
-
- public XSLTWithCatalogResolverTest(String name) {
- super(name);
- }
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(XSLTWithCatalogResolverTest.class);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- catalogResolver = new CatalogResolver();
- xsltLiason = new TraXLiaison();
- xsltLiason.setEntityResolver(catalogResolver);
- xsltLiason.setURIResolver(catalogResolver);
-
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testXSLTwithCatalogResolver() throws Exception {
-
- String testDirName = "data/testXSLTwithCatalogResolver";
- testDirName = TestPlugin.resolvePluginLocation(testDirName);
-
- String catalogFileName = testDirName + SEP + "catalog.xml";
- String xslFileName = testDirName + SEP + "xmlcatalog.xsl";
- String xmlFileName = testDirName + SEP + "xmlcatalog2.xml";
- String resultFileName = xmlFileName + "-out";
- String idealResultFileName = xmlFileName + "-result";
-
- //setup catalog
-
- File catalogFile = new File(catalogFileName);
-
- assertTrue("Catalog file " + catalogFileName + " should exist for the test", catalogFile.exists());
-
- catalogResolver.getCatalog().parseCatalog(catalogFileName);
-
- File xslFile = new File(xslFileName);
-
- assertTrue("XSL file " + xslFileName + " should exist for the test", xslFile.exists());
-
- File inFile = new File(xmlFileName);
-
- assertTrue("XML file " + xslFileName + " should exist for the test", xslFile.exists());
-
- File outFile = FileUtil.createFileAndParentDirectories(resultFileName);
-
- xsltLiason.setStylesheet(xslFile);
- xsltLiason.addParam("outprop", "testvalue");
-
- xsltLiason.transform(inFile, outFile);
-
- boolean diffFound =
- FileUtil.textualCompare(
- outFile,
- new File(idealResultFileName),
- new File(resultFileName + "-diff"));
-
- assertTrue("Output file should match the expected results", !diffFound);
-
-
-
- }
-
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/MyXMLCatalogResolver.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/MyXMLCatalogResolver.java
deleted file mode 100644
index d0f123e..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/MyXMLCatalogResolver.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.wst.xml.uriresolver.validation.tests.internal;
-
-import java.io.IOException;
-
-import org.apache.xerces.util.XMLCatalogResolver;
-import org.apache.xerces.xni.XMLResourceIdentifier;
-import org.apache.xerces.xni.XNIException;
-
-public class MyXMLCatalogResolver extends XMLCatalogResolver {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
-
- }
-
- public String resolveIdentifier(XMLResourceIdentifier resourceIdentifier) throws IOException, XNIException {
- String resolvedId = null;
-
- // The namespace is useful for resolving namespace aware
- // grammars such as XML schema. Let it take precedence over
- // the external identifier if one exists.
- String namespace = resourceIdentifier.getNamespace();
- if (namespace != null) {
- resolvedId = resolveURI(namespace);
- }
-
- // Resolve against an external identifier if one exists. This
- // is useful for resolving DTD external subsets and other
- // external entities. For XML schemas if there was no namespace
- // mapping we might be able to resolve a system identifier
- // specified as a location hint.
- if (resolvedId == null) {
- String publicId = resourceIdentifier.getPublicId();
- String systemId = getUseLiteralSystemId()
- ? resourceIdentifier.getLiteralSystemId()
- : resourceIdentifier.getExpandedSystemId();
- if (publicId != null && systemId != null) {
- resolvedId = resolvePublic(publicId, systemId);
- }
- else if (systemId != null) {
- resolvedId = resolveSystem(systemId);
- }
- }
- return resolvedId;
- }
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/Validator.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/Validator.java
deleted file mode 100644
index b465393..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/Validator.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.wst.xml.uriresolver.validation.tests.internal;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.parsers.SAXParser;
-import org.apache.xerces.util.XMLCatalogResolver;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class Validator {
-
- public boolean validationError = false;
-
- public void validateWithSchema_JAXP(String xmlFile, String[] catalogs) {
- try {
- System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
- "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setNamespaceAware(true);
- factory.setValidating(true);
- factory.setAttribute(
- "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
- "http://www.w3.org/2001/XMLSchema");
-
- // Create catalog resolver and set a catalog list.
- XMLCatalogResolver resolver = new XMLCatalogResolver();
- resolver.setPreferPublic(true);
- resolver.setCatalogList(catalogs);
- factory.setAttribute(
- "http://apache.org/xml/properties/internal/entity-resolver",
- resolver);
-
- DocumentBuilder builder = factory.newDocumentBuilder();
- ErrorHandler handler = new ErrorHandler(this);
- builder.setErrorHandler(handler);
- builder.setEntityResolver(resolver);
- builder.parse(xmlFile);
-
- if (validationError == true)
- System.out.println("XML Document has Error: "
- + handler.saxParseException.getMessage());
- else
- System.out.println("XML Document is valid");
- } catch (java.io.IOException ioe) {
- System.out.println("IOException " + ioe.getMessage());
- } catch (SAXException e) {
- System.out.println("SAXException " + e.getMessage());
- } catch (ParserConfigurationException e) {
- System.out.println("ParserConfigurationException "
- + e.getMessage());
- }
-
- }
-
-
- public void validateWithSchema_XercesSAXParser(String XmlDocumentUrl, String [] catalogs) {
- SAXParser parser = new SAXParser();
- try {
- parser.setFeature("http://xml.org/sax/features/validation", true);
- parser.setFeature(
- "http://apache.org/xml/features/validation/schema", true);
-
- // Create catalog resolver and set a catalog list.
- XMLCatalogResolver resolver = new XMLCatalogResolver();
- resolver.setUseLiteralSystemId(true);
- resolver.setPreferPublic(true);
- resolver.setCatalogList(catalogs);
-
- // Set the resolver on the parser.
- parser.setProperty("http://apache.org/xml/properties/internal/entity-resolver",
- resolver);
-
- ErrorHandler handler = new ErrorHandler(this);
- parser.setErrorHandler(handler);
-
- parser.parse(XmlDocumentUrl);
- if (validationError == true){
- System.out.println("XML Document has Error: "
- + handler.saxParseException.getMessage());
- throw handler.saxParseException;
- }
- else{
- System.out.println("XML Document is valid");
- }
-
- } catch (java.io.IOException ioe) {
- System.out.println("IOException " + ioe.getMessage());
- } catch (SAXException e) {
- System.out.println("SAXException " + e.getMessage());
- }
- }
-
- public void validateWithSchema_XercesDOMParser(String XmlDocumentUrl, String [] catalogs) {
- DOMParser parser = new DOMParser();
- try {
- parser.setFeature("http://xml.org/sax/features/validation", true);
- parser.setFeature(
- "http://apache.org/xml/features/validation/schema", true);
-
- // Create catalog resolver and set a catalog list.
- XMLCatalogResolver resolver = new XMLCatalogResolver();
- resolver.setUseLiteralSystemId(true);
- resolver.setPreferPublic(true);
- resolver.setCatalogList(catalogs);
-
- // Set the resolver on the parser.
- parser.setProperty("http://apache.org/xml/properties/internal/entity-resolver",
- resolver);
-
- ErrorHandler handler = new ErrorHandler(this);
- parser.setErrorHandler(handler);
-
- parser.parse(XmlDocumentUrl);
- if (validationError == true){
- System.out.println("XML Document has Error: "
- + handler.saxParseException.getMessage());
- throw handler.saxParseException;
- }
- else{
- System.out.println("XML Document is valid");
- }
-
- } catch (java.io.IOException ioe) {
- System.out.println("IOException " + ioe.getMessage());
- } catch (SAXException e) {
- System.out.println("SAXException " + e.getMessage());
- }
- }
-
- private class ErrorHandler extends DefaultHandler {
-
- Validator validator;
-
- public SAXParseException saxParseException = null;
-
- public ErrorHandler(Validator validator) {
- super();
- this.validator = validator;
- }
-
- public void error(SAXParseException exception) throws SAXException {
- validationError = true;
- saxParseException = exception;
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- validationError = true;
- saxParseException = exception;
- }
-
- public void warning(SAXParseException exception) throws SAXException {
- }
- }
-
-
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/ValidatorTest.java b/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/ValidatorTest.java
deleted file mode 100644
index 6b84caf..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/src/org/eclipse/wst/xml/uriresolver/validation/tests/internal/ValidatorTest.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.eclipse.wst.xml.uriresolver.validation.tests.internal;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.wst.xml.catalog.tests.internal.TestPlugin;
-
-/**
- * To run this test need to add resolver.jar to the classpath.
- * Run as JUnit Plugin test:
- * - put resolver.jar on the boot class path
- * - add VM argument:
- *
- * -Xbootclasspath/p:<install location>\jre\lib\ext\resolver.jar
- *
- *
- */
-public class ValidatorTest extends TestCase {
-
- Validator validator = null;
-
- protected void setUp() throws Exception {
- super.setUp();
- validator = new Validator();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public ValidatorTest(String name) {
- super(name);
- }
-
-
- public void testValidatingXercesSAXParser1() throws IOException {
- String xmlFile = "/data/Personal/personal-schema.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/catalog2.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesSAXParser(xmlFile, new String[]{catalogFile});
- assertFalse(validator.validationError);
- }
-
- public void testValidatingXercesSAXParser2() throws IOException {
- String xmlFile = "/data/example/example-schema.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/example-catalog.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesSAXParser(xmlFile, new String[]{catalogFile});
- assertFalse(validator.validationError);
- }
- public void testValiatingXercesSAXParser3() throws IOException {
- String xmlFile = "/data/example/example-schema-nonamespace.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/example-catalog.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesSAXParser(xmlFile, new String[]{catalogFile});
- assertFalse(validator.validationError);
- }
-
- public void testValidatingXercesDOMParser1() throws IOException {
- String xmlFile = "/data/example/example-schema-nonamespace.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/example-catalog.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesDOMParser(xmlFile, new String[]{catalogFile});
- assertFalse(validator.validationError);
- }
-
- public void testValidatingJAXPParser1() throws IOException {
- String xmlFile = "/data/example/example-schema.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/example-catalog.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_JAXP(xmlFile, new String[]{catalogFile});
- assertFalse(validator.validationError);
- }
-
- public void testValidationWithImportedAndIncludedSchema1() throws IOException {
- String xmlFile = "/data/PurchaseOrder/international/report_.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/report-catalog_system.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesDOMParser(xmlFile, new String[]{catalogFile});
- // Included schema will be resolved
- assertFalse(validator.validationError);
- }
-
- public void testValidationWithImportedAndIncludedSchema2() throws IOException {
- String xmlFile = "/data/PurchaseOrder/international/report_.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/report-catalog_public.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesDOMParser(xmlFile, new String[]{catalogFile});
- // Included schema will not be resolved
- assertTrue(validator.validationError);
- }
-
- public void testValidationWithImportedAndIncludedSchema3() throws IOException {
- String xmlFile = "/data/PurchaseOrder/international/report_.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "/data/report-catalog_mappedincluded.xml";
- catalogFile = TestPlugin.resolvePluginLocation(catalogFile);
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesDOMParser(xmlFile, new String[]{catalogFile});
- // Included schema will not be resolved
- assertTrue(validator.validationError);
- }
-
- public void testValidationWithImportedSchemaNoCatalog() throws IOException {
- String xmlFile = "/data/PurchaseOrder/international/report.xml";
- xmlFile = TestPlugin.resolvePluginLocation(xmlFile);
-
- String catalogFile = "";
-
- System.out.println("---------" + this.getName() + "---------");
- validator.validateWithSchema_XercesDOMParser(xmlFile, new String[]{catalogFile});
- assertFalse(validator.validationError);
- }
-
-
-
-}
diff --git a/tests/org.eclipse.wst.xml.catalog.tests/test.xml b/tests/org.eclipse.wst.xml.catalog.tests/test.xml
deleted file mode 100644
index 4b384c1..0000000
--- a/tests/org.eclipse.wst.xml.catalog.tests/test.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
-
- <!-- Configurable Properties -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.wst.xml.catalog.tests"/>
-
- <!-- End Configurable Properties -->
-
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
- <property name="bvtworkspace" value="${basedir}"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
- <property name="workspace-folder" value="${bvtworkspace}/${plugin-name}"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org.eclipse.wst.xml.catalog.tests.*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <!-- Start with clean data workspace -->
- <delete dir="${workspace-folder}" quiet="true"/>
-
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${workspace-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.wst.xml.catalog.tests.internal.AllTests"/>
- </ant>
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <delete dir="${workspace-folder}" quiet="true"/>
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.eclipse.wst.xml.catalog.tests*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.wst.xml.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xml.core.tests/META-INF/MANIFEST.MF
index 1a8e661..5faa10a 100644
--- a/tests/org.eclipse.wst.xml.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.xml.core.tests/META-INF/MANIFEST.MF
@@ -2,13 +2,12 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.wst.xml.core.tests; singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: ssemodelxmltests.jar
Bundle-Activator: org.eclipse.wst.xml.core.tests.SSEModelXMLTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.xml.core.internal.document.test;x-internal:=true,
- org.eclipse.wst.xml.core.tests,
+Export-Package: org.eclipse.wst.xml.core.tests,
org.eclipse.wst.xml.core.tests.contentmodel,
org.eclipse.wst.xml.core.tests.document,
org.eclipse.wst.xml.core.tests.dom,
@@ -20,7 +19,7 @@
org.eclipse.wst.xml.core.tests.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.wst.xml.core,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
org.eclipse.core.filebuffers,
org.eclipse.core.resources,
org.eclipse.ui,
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/internal/document/test/NodeImplTestCase.java b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/internal/document/test/NodeImplTestCase.java
deleted file mode 100644
index e47dccf..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/internal/document/test/NodeImplTestCase.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006
- * 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:
- * Balazs Banfai: Bug 154737 getUserData/setUserData support for Node
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=154737
- *******************************************************************************/
-
-
-package org.eclipse.wst.xml.core.internal.document.test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
-import org.eclipse.wst.xml.core.internal.document.NodeImpl;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.UserDataHandler;
-
-
-public class NodeImplTestCase extends TestCase {
- /**
- * Casts to implementation classes because the interface methods being
- * there isn't the interesting part, just whether our behavior with those
- * methods is correct.
- */
-
- NodeImpl element;
- AttrImpl attribute;
- NodeImpl destinationNode;
- Document document;
-
- Element elementToImport;
-
- private static final String KEY="key";
- private static final String VALUE="value";
- private static final String KEY2="key2";
- private static final String VALUE2="value2";
-
-
- /**
- * Sets up the test fixture.
- * (Called before every test case method.)
- */
- protected void setUp() {
-
- DOMModelImpl model = new DOMModelImpl();
- document = model.getDocument();
- element = (NodeImpl)document.createElement("testelement");
- attribute = (AttrImpl)document.createAttribute("attribute");
- }
-
- /*
- * Test for null;
- */
- public void testGetUserData0() {
- assertEquals(null, element.getUserData(KEY));
- assertEquals(null, element.getUserData(null));
- }
-
- /*
- * Test for one key/value
- */
- public void testGetUserData1() {
- element.setUserData(KEY, VALUE, null);
- assertEquals(VALUE,element.getUserData(KEY));
- assertEquals(null, attribute.getUserData(KEY));
- }
-
- /*
- * Test for multiple nodes
- */
- public void testGetUserData2() {
- element.setUserData(KEY, VALUE, null);
- assertEquals(VALUE,element.getUserData(KEY));
- attribute.setUserData(KEY2, VALUE2, null);
- assertEquals(VALUE2,attribute.getUserData(KEY2));
- }
-
- /*
- * Test for multiple keys
- */
- public void testGetUserData3() {
- element.setUserData(KEY, VALUE, null);
- element.setUserData(KEY2, VALUE2, null);
- assertEquals(VALUE,element.getUserData(KEY));
- assertEquals(VALUE2,element.getUserData(KEY2));
- }
-
- /*
- * Test for null key
- */
- public void testSetUserData1() {
- assertEquals(null, element.setUserData(null, VALUE, null));
- }
-
- /*
- * Test for null data with no previous value
- */
- public void testSetUserData2() {
- assertEquals(null, element.setUserData(KEY, null, null));
- }
-
- /*
- * Test for overwriting
- */
- public void testSetUserData3() {
- element.setUserData(KEY, VALUE, null);
- element.setUserData(KEY, VALUE2, null);
- assertEquals(VALUE2, element.getUserData(KEY));
- }
-
- /*
- * Test for deleting
- */
- public void testSetUserData4() {
- element.setUserData(KEY, VALUE, null);
- assertEquals(VALUE, element.getUserData(KEY));
- element.setUserData(KEY, null, null);
- assertEquals(null, element.getUserData(KEY));
- }
-
- /*
- * Test for notifying the UserDataHandler=null
- */
- public void testNotifyUserDataHandler0() {
-
- attribute.setUserData(KEY, VALUE, null);
- destinationNode=(NodeImpl)attribute.cloneNode(true);
- }
-
- /*
- * Test for notifying the UserDataHandler when cloning an attribute
- */
- public void testNotifyUserDataHandler1() {
-
- attribute.setUserData(KEY, VALUE, new UserDataHandler(){
-
- public void handle(short operation, String key, Object data, Node src, Node dst) {
- assertEquals(UserDataHandler.NODE_CLONED, operation);
- assertEquals(VALUE, data);
- assertEquals(KEY, key);
- assertEquals(src, attribute);
-
- System.out.println("Operation: "+operation+" Key:"+ key
- + " Object:"+data+" SourceNode:"+src.getLocalName()+" DestinationNode:"+dst.getLocalName());
-
- }
- });
- //event occurs before the destinationNode returns....
- destinationNode=(AttrImpl)attribute.cloneNode(true);
- }
-
- /*
- * Test for notifying the UserDataHandler when importing
- */
- public void testNotifyUserDataHandler2() {
- elementToImport = document.createElement("ElementToImport");
- ((NodeImpl)elementToImport).setUserData(KEY, VALUE, new UserDataHandler(){
-
- public void handle(short operation, String key, Object data, Node src, Node dst) {
-
- //see if NODE.IMPORTED notification occurs with the right
- //parameters
- if (operation==UserDataHandler.NODE_IMPORTED) {
- assertEquals(VALUE, data);
- assertEquals(KEY, key);
- assertEquals(src, elementToImport);
- assertEquals(dst, null);
- System.out.println("Operation: "+operation+" Key:"+ key
- + " Object:"+data+" SourceNode:"+src.getLocalName()+" DestinationNode:"+dst);
- }
- }
- });
- document.importNode(elementToImport, true);
- }
-}
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/SSEModelXMLTestSuite.java b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/SSEModelXMLTestSuite.java
index fa99dff..20dba12 100644
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/SSEModelXMLTestSuite.java
+++ b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/SSEModelXMLTestSuite.java
@@ -13,7 +13,6 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.wst.xml.core.internal.document.test.NodeImplTestCase;
import org.eclipse.wst.xml.core.tests.contentmodel.TestCatalogRetrivalAndModelCreation;
import org.eclipse.wst.xml.core.tests.document.GetDocumentRegionsTest;
import org.eclipse.wst.xml.core.tests.document.TestStructuredDocument;
@@ -50,7 +49,6 @@
addTest(new TestSuite(TestCatalogRetrivalAndModelCreation.class));
addTest(new TestSuite(GetDocumentRegionsTest.class));
- addTest(new TestSuite(NodeImplTestCase.class));
addTest(new TestSuite(TestFormatProcessorXML.class));
}
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/CMVisitorTest.java b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/CMVisitorTest.java
index 55f8551..4ca8040 100644
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/CMVisitorTest.java
+++ b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/CMVisitorTest.java
@@ -41,7 +41,8 @@
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
try {
- XMLAssociationProvider provider = new XMLAssociationProvider(CMDocumentCache.getInstance()) {
+ CMDocumentCache cache = new CMDocumentCache();
+ XMLAssociationProvider provider = new XMLAssociationProvider(cache) {
};
ModelQuery mq = new ModelQueryImpl(provider);
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/TestCatalogRetrivalAndModelCreation.java b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/TestCatalogRetrivalAndModelCreation.java
index e2a2441..741decd 100644
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/TestCatalogRetrivalAndModelCreation.java
+++ b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/contentmodel/TestCatalogRetrivalAndModelCreation.java
@@ -150,7 +150,7 @@
CMDocument contentModel = contentModelManager.createCMDocument(EXPECTED_URI, null);
assertNotNull("expected to create content model for " + EXPECTED_URI, contentModel);
int actualCount = contentModel.getElements().getLength();
- assertEquals("count of element declarations found for content model create from " + EXPECTED_URI, contentModel.getElements().getLength(), actualCount);
+ assertTrue("expected to create content model with '" + count + "' element declarations for " + EXPECTED_URI + " but found " + actualCount, contentModel.getElements().getLength() == count);
}
private void doURITest(String EXPECTED_URI) throws MalformedURLException, IOException {
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/TestFormatProcessorXML.java b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/TestFormatProcessorXML.java
index 2096350..8b0c72a 100644
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/TestFormatProcessorXML.java
+++ b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/TestFormatProcessorXML.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 Eclipse Foundation
+ * Copyright (c) 2006 Eclipse Foundation
* 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
@@ -22,27 +22,26 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.format.AbstractStructuredFormatProcessor;
import org.eclipse.wst.sse.core.internal.format.IStructuredFormatPreferences;
import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.util.URIResolver;
import org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML;
-import org.eclipse.wst.xml.core.internal.provisional.format.StructuredFormatPreferencesXML;
+import org.eclipse.wst.xml.core.internal.provisional.format.IStructuredFormatPreferencesXML;
import org.eclipse.wst.xml.core.tests.util.StringCompareUtil;
public class TestFormatProcessorXML extends TestCase {
private static final boolean SPLIT_MULTI_ATTRS = false;
- private static final String INDENT = "\t";
+ private static final String INDENT = " ";
private static final boolean CLEAR_ALL_BLANK_LINES = false;
private static final int MAX_LINE_WIDTH = 72;
private static final String UTF_8 = "UTF-8";
-
+
private StringCompareUtil fStringCompareUtil;
public TestFormatProcessorXML(String name) {
@@ -125,10 +124,6 @@
}
protected void formatAndAssertEquals(String beforePath, String afterPath) throws UnsupportedEncodingException, IOException, CoreException {
- formatAndAssertEquals(beforePath, afterPath, true);
- }
-
- private void formatAndAssertEquals(String beforePath, String afterPath, boolean resetPreferences) throws UnsupportedEncodingException, IOException, CoreException {
IStructuredModel beforeModel = null, afterModel = null;
try {
beforeModel = getModelForEdit(beforePath);
@@ -137,12 +132,13 @@
afterModel = getModelForEdit(afterPath);
assertNotNull("could not retrieve structured model for : " + afterPath, afterModel);
- if (resetPreferences)
- resetPreferencesToDefault();
+ IStructuredFormatPreferences formatPreferences = formatProcessor.getFormatPreferences();
+ formatPreferences.setLineWidth(MAX_LINE_WIDTH);
+ formatPreferences.setClearAllBlankLines(CLEAR_ALL_BLANK_LINES);
+ formatPreferences.setIndent(INDENT);
+ ((IStructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(SPLIT_MULTI_ATTRS);
- ((AbstractStructuredFormatProcessor) formatProcessor).refreshFormatPreferences = false;
formatProcessor.formatModel(beforeModel);
- ((AbstractStructuredFormatProcessor) formatProcessor).refreshFormatPreferences = true;
ByteArrayOutputStream formattedBytes = new ByteArrayOutputStream();
beforeModel.save(formattedBytes); // "beforeModel" should now be
@@ -151,9 +147,9 @@
ByteArrayOutputStream afterBytes = new ByteArrayOutputStream();
afterModel.save(afterBytes);
- String expectedContents = new String(afterBytes.toByteArray(), UTF_8);
- String actualContents = new String(formattedBytes.toByteArray(), UTF_8);
- assertTrue("Formatted document differs from the expected.\nExpected Contents:\n" + expectedContents + "\nActual Contents:\n" + actualContents, fStringCompareUtil.equalsIgnoreLineSeperator(expectedContents, actualContents));
+ String formattedContents = new String(afterBytes.toByteArray(), UTF_8);
+ String expectedContents = new String(formattedBytes.toByteArray(), UTF_8);
+ assertTrue("Formatted document differs from the expected", fStringCompareUtil.equalsIgnoreLineSeperator(formattedContents, expectedContents));
}
finally {
if (beforeModel != null)
@@ -163,14 +159,6 @@
}
}
- private void resetPreferencesToDefault() {
- IStructuredFormatPreferences formatPreferences = formatProcessor.getFormatPreferences();
- formatPreferences.setLineWidth(MAX_LINE_WIDTH);
- formatPreferences.setClearAllBlankLines(CLEAR_ALL_BLANK_LINES);
- formatPreferences.setIndent(INDENT);
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(SPLIT_MULTI_ATTRS);
- }
-
public void testSimpleXml() throws UnsupportedEncodingException, IOException, CoreException {
formatAndAssertEquals("testfiles/xml/simple-standalone.xml", "testfiles/xml/simple-standalone-fmt.xml");
}
@@ -188,41 +176,4 @@
formatAndAssertEquals("testfiles/xml/oneline.xml", "testfiles/xml/oneline-fmt.xml");
}
- public void testOneLineTextNodeFormat() throws UnsupportedEncodingException, IOException, CoreException {
- // BUG166441
- formatAndAssertEquals("testfiles/xml/onelineTextNode.xml", "testfiles/xml/onelineTextNode-fmt.xml");
- }
-
- public void testEmptyContentNodeFormat() throws UnsupportedEncodingException, IOException, CoreException {
- // BUG174243
- IStructuredFormatPreferences formatPreferences = formatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setSplitMultiAttrs(true);
- formatAndAssertEquals("testfiles/xml/usetagswithemptycontent.xml", "testfiles/xml/usetagswithemptycontent-fmt.xml", false);
- }
-
- public void testXSLFormat() throws UnsupportedEncodingException, IOException, CoreException {
- // BUG108074
- formatAndAssertEquals("testfiles/xml/xslattributetext.xsl", "testfiles/xml/xslattributetext-fmt.xsl");
- }
-
- public void testEntityFormat() throws UnsupportedEncodingException, IOException, CoreException {
- // BUG102076
- formatAndAssertEquals("testfiles/xml/entities.xml", "testfiles/xml/entities-fmt.xml");
- }
-
- public void testPreservePCDATAFormat() throws UnsupportedEncodingException, IOException, CoreException {
- // BUG84688
- IStructuredFormatPreferences formatPreferences = formatProcessor.getFormatPreferences();
- ((StructuredFormatPreferencesXML) formatPreferences).setPreservePCDATAContent(true);
- formatAndAssertEquals("testfiles/xml/xml-preservepcdata.xml", "testfiles/xml/xml-preservepcdata-yes-fmt.xml", false);
-
- ((StructuredFormatPreferencesXML) formatPreferences).setPreservePCDATAContent(false);
- formatAndAssertEquals("testfiles/xml/xml-preservepcdata.xml", "testfiles/xml/xml-preservepcdata-no-fmt.xml", false);
- }
-
- public void testPreserveCDATAFormat() throws UnsupportedEncodingException, IOException, CoreException {
- // BUG161330
- formatAndAssertEquals("testfiles/xml/usecdata.xml", "testfiles/xml/usecdata-fmt.xml");
- formatAndAssertEquals("testfiles/xml/usecdata2.xml", "testfiles/xml/usecdata2-fmt.xml");
- }
}
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/entities-fmt.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/entities-fmt.xml
deleted file mode 100644
index 9c2e657..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/entities-fmt.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE document [
-<!ENTITY EII "<emph>element information item</emph>">
-]>
-<document>
- This document contains no child
- &EII;s. It does contain a non&EII;.
-</document>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/entities.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/entities.xml
deleted file mode 100644
index 15bdedc..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/entities.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE document [
-<!ENTITY EII "<emph>element information item</emph>">
-]>
-<document>
-This document contains no child &EII;s. It does contain a non&EII;.
-</document>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/onelineTextNode-fmt.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/onelineTextNode-fmt.xml
deleted file mode 100644
index 2709548..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/onelineTextNode-fmt.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<one attr="1" attr2="2">
- <two></two>
- <three>
- <four></four>
- </three>
-</one>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/onelineTextNode.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/onelineTextNode.xml
deleted file mode 100644
index b513f6a..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/onelineTextNode.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><one attr="1" attr2="2"> <two></two><three><four> </four></three></one>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/tagswithemptycontent.dtd b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/tagswithemptycontent.dtd
deleted file mode 100644
index 67217a5..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/tagswithemptycontent.dtd
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!ELEMENT topmost (empty,emptywithattribute)>
-<!ELEMENT empty EMPTY>
-<!ELEMENT emptywithattribute EMPTY>
-<!ATTLIST emptywithattribute
- myattribute1 CDATA #IMPLIED
- myattribute2 CDATA #IMPLIED>
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata-fmt.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata-fmt.xml
deleted file mode 100644
index dfe43e1..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata-fmt.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<manytags>
- <sometag someattr="someattrvalue"><![CDATA[
- blah blah blah
- nothing
- changes
- in
-here
-]]></sometag>
-</manytags>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata.xml
deleted file mode 100644
index ebc176a..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<manytags> <sometag someattr="someattrvalue"><![CDATA[
- blah blah blah
- nothing
- changes
- in
-here
-]]></sometag>
-</manytags>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata2-fmt.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata2-fmt.xml
deleted file mode 100644
index 9a4a3a2..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata2-fmt.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<script>
- nospacebetweenmeandcdata<![CDATA[
-function matchwo(a,b)
-{
-if (a < b && a < 0) then
- {
- return 1
- }
-else
- {
- return 0
- }
-}
-]]>nospacebetweenmeandcdata
-</script>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata2.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata2.xml
deleted file mode 100644
index bab4ec9..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usecdata2.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<script>
-nospacebetweenmeandcdata<![CDATA[
-function matchwo(a,b)
-{
-if (a < b && a < 0) then
- {
- return 1
- }
-else
- {
- return 0
- }
-}
-]]>nospacebetweenmeandcdata
-</script>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usetagswithemptycontent-fmt.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usetagswithemptycontent-fmt.xml
deleted file mode 100644
index 5ac2eef..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usetagswithemptycontent-fmt.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE topmost SYSTEM "tagswithemptycontent.dtd" >
-<topmost>
- <empty></empty>
- <emptywithattribute
- myattribute1=""
- myattribute2=""></emptywithattribute>
-</topmost>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usetagswithemptycontent.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usetagswithemptycontent.xml
deleted file mode 100644
index 7299cd5..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/usetagswithemptycontent.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE topmost SYSTEM "tagswithemptycontent.dtd" >
-<topmost>
- <empty></empty>
- <emptywithattribute myattribute1="" myattribute2=""></emptywithattribute>
-</topmost>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata-no-fmt.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata-no-fmt.xml
deleted file mode 100644
index 60683f9..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata-no-fmt.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pcdatalicious SYSTEM "xml-preservepcdata.dtd" >
-<pcdatalicious>
- <ihavepcdata>i have pcdata</ihavepcdata>
- <ihavepcdata>
- i have
-
-
-
- spaces
- </ihavepcdata>
- <idont />
- <neitherdoi>do i have pcdata? i'm not sure. boo hoo.</neitherdoi>
-</pcdatalicious>
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata-yes-fmt.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata-yes-fmt.xml
deleted file mode 100644
index 5109c8f..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata-yes-fmt.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pcdatalicious SYSTEM "xml-preservepcdata.dtd" >
-<pcdatalicious>
- <ihavepcdata>i have pcdata</ihavepcdata>
- <ihavepcdata> i have
-
-
-
- spaces </ihavepcdata>
- <idont />
- <neitherdoi>do i have pcdata? i'm not sure. boo hoo.</neitherdoi>
-</pcdatalicious>
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata.dtd b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata.dtd
deleted file mode 100644
index fd086dc..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata.dtd
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!ELEMENT pcdatalicious (ihavepcdata*,idont*,neitherdoi*)>
-<!ELEMENT ihavepcdata (#PCDATA)>
-<!ELEMENT idont EMPTY>
-<!ELEMENT neitherdoi ANY>
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata.xml
deleted file mode 100644
index 2874f87..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-preservepcdata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pcdatalicious SYSTEM "xml-preservepcdata.dtd" >
-<pcdatalicious>
- <ihavepcdata>i have pcdata</ihavepcdata>
- <ihavepcdata> i have
-
-
-
- spaces </ihavepcdata>
- <idont/>
- <neitherdoi>do i have pcdata? i'm not sure. boo hoo.</neitherdoi>
-</pcdatalicious>
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-space-preserve-dtd-actual.xml b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-space-preserve-dtd-actual.xml
deleted file mode 100644
index f30c047..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xml-space-preserve-dtd-actual.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE main SYSTEM "xml-space-preserve.dtd">
-<main>
- <nothing>
- this is not a target, strip spaces as
- you please </nothing>
-<preserve>
- This is just
-
- a simple test
- .
- .
- .
- </preserve>
- of the formatter.
- <preserve xml:space="default">
- This particular text can
-
- and should be reformatted.
- </preserve>
-
-<preserve>
- This is just
-
- a simple test
- <nothing>
- this space is not for sale OR FORMATTING
- , please </nothing> <!-- NOTE THE SPACES --> <space-default>
- No man
-
- is an
-
- island, .
- .
- .
- but this section is, really, so clean it up please - waste of space
- </space-default>
- .
- . This should be space preserved
- </preserve>
- <preserve2>
-This particular
- text may
-
-not reformatted.</preserve2> <nothing>
- this is not a target, strip spaces as
- you please </nothing>
-</main>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xslattributetext-fmt.xsl b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xslattributetext-fmt.xsl
deleted file mode 100644
index b75426e..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xslattributetext-fmt.xsl
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <html>
- <body>
- <h2>Space Checking</h2>
- <p>
- <xsl:attribute name="align">center</xsl:attribute>
- Check:
- <xsl:for-each select="text/item">
- <xsl:value-of select="something" />
- <xsl:if test="position()=last()-1">
- <xsl:text>trailing spaces </xsl:text>
- </xsl:if>
- <xsl:if test="position()=last()-1">
- <xsl:text> leading spaces</xsl:text>
- </xsl:if>
- <xsl:if test="position()=last()">
- <xsl:text>nospace</xsl:text>
- </xsl:if>
- </xsl:for-each>
- </p>
- </body>
- </html>
- </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xslattributetext.xsl b/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xslattributetext.xsl
deleted file mode 100644
index e87e387..0000000
--- a/tests/org.eclipse.wst.xml.core.tests/src/org/eclipse/wst/xml/core/tests/format/testfiles/xml/xslattributetext.xsl
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:template match="/">
-<html>
- <body>
- <h2>Space Checking</h2>
- <p><xsl:attribute name="align">center</xsl:attribute>Check:<xsl:for-each select="text/item"><xsl:value-of select="something"/>
- <xsl:if test="position()=last()-1">
- <xsl:text>trailing spaces </xsl:text>
- </xsl:if>
- <xsl:if test="position()=last()-1">
- <xsl:text> leading spaces</xsl:text>
- </xsl:if>
- <xsl:if test="position()=last()">
- <xsl:text>nospace</xsl:text>
- </xsl:if>
- </xsl:for-each>
- </p>
- </body>
- </html>
-</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.core.tests/test.xml b/tests/org.eclipse.wst.xml.core.tests/test.xml
index d021aae..bdc6838 100644
--- a/tests/org.eclipse.wst.xml.core.tests/test.xml
+++ b/tests/org.eclipse.wst.xml.core.tests/test.xml
@@ -1,115 +1,53 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<project name="testsuite" default="run" basedir=".">
-<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
- <!-- should be little need to change what's above -->
-
- <property
- name="plugin-name"
- value="org.eclipse.wst.xml.core.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.xml.core.tests.SSEModelXMLTestSuite" />
- <property
- name="testType"
- value="core-test" />
+ <!-- sets the properties plugin-name, and library-file -->
+ <property name="plugin-name" value="org.eclipse.wst.xml.core.tests" />
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
+ <property
+ name="workspace"
+ value="${eclipse-home}/junitworkspace-${plugin-name}" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org.eclipse.wst.xml.core.tests.*xml" />
+ </delete>
+ </target>
- <!-- should be little need to change what's below -->
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="wst-folder" value="${eclipse-home}/wst_folder" />
+ <delete dir="${wst-folder}" quiet="true" />
+ <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${wst-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="org.eclipse.wst.xml.core.tests.SSEModelXMLTestSuite" />
+ <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!-- <delete dir="${workspace}" quiet="true" /> -->
+ </target>
-
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org.eclipse.wst.xml.core.tests.*xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ <!-- <emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.tests.encoding/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xml.tests.encoding/META-INF/MANIFEST.MF
index d512c02..beb6b81 100644
--- a/tests/org.eclipse.wst.xml.tests.encoding/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.xml.tests.encoding/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@
org.eclipse.wst.xml.tests.encoding.write,
org.eclipse.wst.xml.tests.encoding.xml
Require-Bundle: org.eclipse.core.resources,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
org.eclipse.ui,
org.eclipse.ui.workbench,
org.eclipse.ui.ide,
diff --git a/tests/org.eclipse.wst.xml.tests.encoding/test.xml b/tests/org.eclipse.wst.xml.tests.encoding/test.xml
index 0769819..6e5a12b 100644
--- a/tests/org.eclipse.wst.xml.tests.encoding/test.xml
+++ b/tests/org.eclipse.wst.xml.tests.encoding/test.xml
@@ -1,115 +1,89 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
- <!-- should be little need to change what's above -->
+ <!-- Configurable Properties -->
- <property
- name="plugin-name"
- value="org.eclipse.wst.xml.tests.encoding" />
- <property
- name="classname"
- value="org.eclipse.wst.xml.tests.encoding.EncodingTestSuite" />
- <property
- name="testType"
- value="ui-test" />
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." /> -->
- <!-- should be little need to change what's below -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- sets the properties plugin-name, and library-file -->
+ <property
+ name="plugin-name"
+ value="org.eclipse.wst.xml.tests.encoding" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.xml.tests.encoding.*xml" />
+ </delete>
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
+ <ant
+ target="core-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="org.eclipse.wst.xml.tests.encoding" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.xml.tests.encoding.EncodingTestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
- </target>
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!--<delete dir="${workspace}" quiet="true" />-->
+ </target>
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.xml.tests.encoding.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ <!--<emailResults resultsFile="${build-results-home}/${plugin-name}.xml" addresslist="david_williams@us.ibm.com" /> -->
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xml.ui.tests/META-INF/MANIFEST.MF
index 7492e14..f7d4f9e 100644
--- a/tests/org.eclipse.wst.xml.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.xml.ui.tests/META-INF/MANIFEST.MF
@@ -7,8 +7,7 @@
Bundle-Activator: org.eclipse.wst.xml.ui.tests.XMLUITestsPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.xml.ui.internal.validation;x-internal:=true,
- org.eclipse.wst.xml.ui.tests,
+Export-Package: org.eclipse.wst.xml.ui.tests,
org.eclipse.wst.xml.ui.tests.breakpoints,
org.eclipse.wst.xml.ui.tests.viewer
Require-Bundle: org.eclipse.ui,
@@ -17,7 +16,7 @@
org.eclipse.wst.sse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
org.eclipse.wst.sse.core,
org.eclipse.ui.views,
org.eclipse.core.resources,
diff --git a/tests/org.eclipse.wst.xml.ui.tests/build.properties b/tests/org.eclipse.wst.xml.ui.tests/build.properties
index 51ac9f1..15cc63c 100644
--- a/tests/org.eclipse.wst.xml.ui.tests/build.properties
+++ b/tests/org.eclipse.wst.xml.ui.tests/build.properties
@@ -14,8 +14,7 @@
META-INF/,\
plugin.properties,\
about.html,\
- testresources/,\
- icons/
+ testresources/
jars.compile.order = xmluitests.jar
source.xmluitests.jar = src/
output.xmluitests.jar = bin/
diff --git a/tests/org.eclipse.wst.xml.ui.tests/test.xml b/tests/org.eclipse.wst.xml.ui.tests/test.xml
index d928e35..e47fef0 100644
--- a/tests/org.eclipse.wst.xml.ui.tests/test.xml
+++ b/tests/org.eclipse.wst.xml.ui.tests/test.xml
@@ -1,114 +1,85 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <!-- <property name="eclipse-home" value="${basedir}\..\.." />-->
- <!-- should be little need to change what's above -->
+ <echo message="basedir ${basedir}" />
+ <echo message="eclipse place ${eclipse-home}" />
+
+ <!-- sets the properties plugin-name, and library-file -->
<property
name="plugin-name"
value="org.eclipse.wst.xml.ui.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.xml.ui.tests.XMLUITestSuite" />
- <property
- name="testType"
- value="ui-test" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <!-- should be little need to change what's below -->
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.xml.ui.tests.*xml" />
+ </delete>
+ </target>
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property
+ name="wst-folder"
+ value="${eclipse-home}/wst_folder" />
+ <delete
+ dir="${wst-folder}"
+ quiet="true" />
+ <ant
+ target="ui-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${wst-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.xml.ui.tests.XMLUITestSuite" />
+ <property
+ name="plugin-path"
+ value="${eclipse-home}/plugins/${plugin-name}" />
+ </ant>
+ </target>
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <!-- <delete dir="${workspace}" quiet="true" />-->
+ </target>
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
-
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
-
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.xml.ui.tests.*xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ </target>
</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF
index 14eb0b3..e388a83 100644
--- a/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.xml.validation.tests/META-INF/MANIFEST.MF
@@ -7,11 +7,8 @@
Bundle-Activator: org.eclipse.wst.xml.validation.tests.internal.XMLValidatorTestsPlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.xml.core.internal.validation;x-internal:=true,
- org.eclipse.wst.xml.core.internal.validation.eclipse;x-internal:=true,
- org.eclipse.wst.xml.core.internal.validation.errorcustomization;x-internal:=true,
- org.eclipse.wst.xml.validation.tests.internal;x-internal:=true
-Require-Bundle: org.junit;bundle-version="[3.8.0,4.0.0)",
+Export-Package: org.eclipse.wst.xml.validation.tests.internal;x-internal:=true
+Require-Bundle: org.junit,
org.eclipse.core.runtime,
org.eclipse.wst.xml.core,
org.eclipse.wst.xml.ui,
diff --git a/tests/org.eclipse.wst.xsd.validation.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xsd.validation.tests/META-INF/MANIFEST.MF
index 7174454..55c2bad 100644
--- a/tests/org.eclipse.wst.xsd.validation.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.xsd.validation.tests/META-INF/MANIFEST.MF
@@ -8,13 +8,11 @@
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.resources,
- org.junit;bundle-version="[3.8.0,4.0.0)",
+ org.junit,
org.eclipse.wst.xml.core,
org.eclipse.core.runtime,
org.eclipse.wst.xsd.core,
org.eclipse.wst.validation,
org.eclipse.wst.common.uriresolver
Eclipse-LazyStart: true
-Export-Package: org.eclipse.wst.xsd.core.internal.validation;x-internal:=true,
- org.eclipse.wst.xsd.core.internal.validation.eclipse;x-internal:=true,
- org.eclipse.wst.xsd.validation.tests.internal;x-internal:=true
+Export-Package: org.eclipse.wst.xsd.validation.tests.internal;x-internal:=true
diff --git a/tests/org.eclipse.wst.xsd.validation.tests/test.xml b/tests/org.eclipse.wst.xsd.validation.tests/test.xml
index 3fdec81..c5d8fd0 100644
--- a/tests/org.eclipse.wst.xsd.validation.tests/test.xml
+++ b/tests/org.eclipse.wst.xsd.validation.tests/test.xml
@@ -1,116 +1,96 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<project
- name="testsuite"
- default="run"
- basedir=".">
-
- <!-- The following properties should be passed into this script -->
- <!-- ${eclipse-home} -->
- <!-- ${buildDirectory} -->
- <!-- ${buildLabel} -->
+ name="testsuite"
+ default="run"
+ basedir=".">
- <!-- should be little need to change what's above -->
-
+ <!-- Configurable Properties -->
+
+ <!-- sets the properties eclipse-home, and library-file -->
<property
name="plugin-name"
value="org.eclipse.wst.xsd.validation.tests" />
- <property
- name="classname"
- value="org.eclipse.wst.xsd.validation.tests.internal.AllXSDTests" />
- <property
- name="testType"
- value="core-test" />
+ <!-- End Configurable Properties -->
- <!-- should be little need to change what's below -->
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property
+ name="eclipse-home"
+ value="${basedir}\..\.." />
+ <property
+ name="bvtworkspace"
+ value="${basedir}" />
+ <property
+ name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
+ <property
+ name="workspace-folder"
+ value="${bvtworkspace}/${plugin-name}" />
- <echo message="basedir: ${basedir}" />
- <echo message="eclipse-home: ${eclipse-home}" />
- <echo message="buildDirectory: ${buildDirectory}" />
- <echo message="plugin-name: ${plugin-name}" />
- <echo message="classname: ${classname}" />
- <echo message="testType ${testType}" />
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset
+ dir="${eclipse-home}"
+ includes="org.eclipse.wst.xsd.validation.tests.*.xml" />
+ </delete>
+ </target>
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
- <property
- name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
- <property
- name="workspace"
- value="${eclipse-home}/junitworkspaces/${plugin-name}" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset
- dir="${eclipse-home}"
- includes="${plugin-name}.*xml" />
- </delete>
- <!-- make directory, in case path doesn't exist yet -->
- <mkdir dir="${workspace}" />
- <!-- but delete to make sure fresh contents-->
- <delete
- dir="${workspace}"
- quiet="true" />
+ <!-- Start with clean data workspace -->
+ <delete
+ dir="${workspace-folder}"
+ quiet="true" />
- </target>
+ <ant
+ target="core-test"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="data-dir"
+ value="${workspace-folder}" />
+ <property
+ name="plugin-name"
+ value="${plugin-name}" />
+ <property
+ name="classname"
+ value="org.eclipse.wst.xsd.validation.tests.internal.AllXSDTests" />
+ </ant>
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
+ </target>
- <ant
- target="${testType}"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="data-dir"
- value="${workspace}" />
- <property
- name="plugin-name"
- value="${plugin-name}" />
- <property
- name="classname"
- value="${classname}" />
- <property
- name="plugin-path"
- value="${eclipse-home}/plugins/${plugin-name}" />
- </ant>
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <delete
+ dir="${workspace-folder}"
+ quiet="true" />
+ </target>
- <copy
- failonerror="false"
- file="${workspace}/.metadata/.log"
- tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <!-- usually no need to delete workspace until next run, and leaving it allows inspection -->
- <!-- <delete dir="${workspace}" quiet="true" /> -->
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target
- name="run"
- depends="init,suite,cleanup">
- <ant
- target="collect"
- antfile="${library-file}"
- dir="${eclipse-home}">
- <property
- name="includes"
- value="${plugin-name}.*xml" />
- <property
- name="output-file"
- value="${plugin-name}.xml" />
- </ant>
- </target>
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target
+ name="run"
+ depends="init,suite,cleanup">
+ <ant
+ target="collect"
+ antfile="${library-file}"
+ dir="${eclipse-home}">
+ <property
+ name="includes"
+ value="org.eclipse.wst.xsd.validation.tests*.xml" />
+ <property
+ name="output-file"
+ value="${plugin-name}.xml" />
+ </ant>
+ </target>
</project>