xml tests moved to community

This commit is contained in:
Dmitry Avdeev
2012-07-19 12:43:17 +04:00
parent 779baf0b1d
commit b5d705ba74
34 changed files with 8801 additions and 0 deletions
@@ -0,0 +1,43 @@
package com.intellij.codeInsight.daemon.quickFix;
import com.intellij.codeInsight.daemon.impl.quickfix.FetchExtResourceAction;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.testFramework.PlatformTestUtil;
import java.io.File;
/**
* Created by IntelliJ IDEA.
* User: ik
* Date: 03.09.2003
* Time: 19:32:51
* To change this template use Options | File Templates.
*/
public class FetchExternalResourcesFixTest extends LightQuickFixTestCase {
public void test() throws Exception { doAllTests(); }
@Override
protected String getBasePath() {
return "/quickFix/fetchExternalResources";
}
// just check for action availability
@Override
protected void doAction(String text, boolean actionShouldBeAvailable, String testFullPath, String testName) throws Exception {
IntentionAction action = findActionWithText(text);
if (action == null && actionShouldBeAvailable) {
fail("Action with text '" + text + "' is not available in test " + testFullPath);
}
if (actionShouldBeAvailable && testName.equals("5.xml")) {
final String uri = FetchExtResourceAction.findUri(myFile, myEditor.getCaretModel().getOffset());
final String url = FetchExtResourceAction.findUrl(myFile, myEditor.getCaretModel().getOffset(),uri);
assertEquals("http://www.springframework.org/schema/aop/spring-aop.xsd",url);
}
}
@Override
protected String getTestDataPath() {
return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/";
}
}
@@ -0,0 +1,29 @@
package com.intellij.codeInsight.daemon.quickFix;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.testFramework.PlatformTestUtil;
import java.io.File;
public class IgnoreExternalResourcesFixTest extends LightQuickFixTestCase {
public void test() throws Exception { doAllTests(); }
@Override
protected String getBasePath() {
return "/quickFix/ignoreExternalResources";
}
// just check for action availability
@Override
protected void doAction(String text, boolean actionShouldBeAvailable, String testFullPath, String testName) throws Exception {
IntentionAction action = findActionWithText(text);
if (action == null && actionShouldBeAvailable) {
fail("Action with text '" + text + "' is not available in test " + testFullPath);
}
}
@Override
protected String getTestDataPath() {
return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/";
}
}
@@ -0,0 +1,29 @@
package com.intellij.codeInsight.daemon.quickFix;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.testFramework.PlatformTestUtil;
import java.io.File;
public class ManuallySetupExternalResourcesFixTest extends LightQuickFixTestCase {
public void test() throws Exception { doAllTests(); }
@Override
protected String getBasePath() {
return "/quickFix/manuallySetupExternalResources";
}
// just check for action availability
@Override
protected void doAction(String text, boolean actionShouldBeAvailable, String testFullPath, String testName) throws Exception {
IntentionAction action = findActionWithText(text);
if (action == null && actionShouldBeAvailable) {
fail("Action with text '" + text + "' is not available in test " + testFullPath);
}
}
@Override
protected String getTestDataPath() {
return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/xml/tests/testData/";
}
}
@@ -0,0 +1,17 @@
<!ENTITY % HTMLlat1 PUBLIC
"-//W3C//ENTITIES Latin 1 for XHTML//EN"
"xhtml-lat1.ent">
<!ENTITY % HTMLsymbol PUBLIC
"-//W3C//ENTITIES Symbols for XHTML//EN"
"xhtml-symbol.ent">
<!ENTITY % HTMLspecial PUBLIC
"-//W3C//ENTITIES Special for XHTML//EN"
"xhtml-special.ent">
<!ENTITY % HTMLspecial PUBLIC
"-//W3C//ENTITIES Special for XHTML//EN"
"xhtml-special.ent">
<!ENTITY % ContentType "CDATA">
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://java.sun.com/xml/ns/j2ee"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.4">
<xsd:include schemaLocation="j2ee_1_4.xsd"/>
<include schemaLocation="jsp_2_0.xsd"/>
</xsd:schema>
@@ -0,0 +1,105 @@
<!ENTITY % sgml.features "IGNORE">
<![%sgml.features;[
<!ENTITY % xml.features "IGNORE">
]]>
<!ENTITY % xml.features "INCLUDE">
<![%sgml.features;[
<![%xml.features;[
<!-- ERROR: Exactly one of xml.features and sgml.features must be turned on! -->
<!ENTITY % dbnotn SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
<!ENTITY % dbcent SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
<!ENTITY % dbpool SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
<!ENTITY % dbhier SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
<!ENTITY % dbgenent SYSTEM "http://www.oasis-open.org/docbook/xml/configerror.txt">
]]>
]]>
<![%sgml.features;[
<!ENTITY % ho "- O">
<!ENTITY % hh "- -">
]]>
<![%xml.features;[
<!ENTITY % ho "">
<!ENTITY % hh "">
]]>
<!ENTITY % dbnotn.module "INCLUDE">
<![%dbnotn.module;[
<!ENTITY % dbnotn PUBLIC
"-//OASIS//ENTITIES DocBook Notations V4.4//EN"
"dbnotnx.mod">
%dbnotn;
]]>
<!-- ...................................................................... -->
<!-- ISO character entity sets ............................................ -->
<!ENTITY % dbcent.module "INCLUDE">
<![%dbcent.module;[
<!ENTITY % dbcent.euro "INCLUDE">
<![%dbcent.euro;[
<![%sgml.features;[
<!ENTITY euro SDATA "[euro ]"><!-- euro sign -->
]]>
<![%xml.features;[
<!ENTITY euro "&#x20AC;"><!-- euro sign, U+20AC NEW -->
]]>
]]>
<!ENTITY % dbcent PUBLIC
"-//OASIS//ENTITIES DocBook Character Entities V4.4//EN"
"dbcentx.mod">
%dbcent;
]]>
<!-- ...................................................................... -->
<!-- DTD modules .......................................................... -->
<!-- Information pool .............. -->
<!ENTITY % dbpool.module "INCLUDE">
<![ %dbpool.module; [
<!ENTITY % dbpool PUBLIC
"-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN"
"dbpoolx.mod">
%dbpool;
]]>
<!-- Redeclaration placeholder ..... -->
<!ENTITY % intermod.redecl.module "IGNORE">
<![%intermod.redecl.module;[
<!-- Defining rdbmods here makes some buggy XML parsers happy. -->
<!ENTITY % rdbmods "">
%rdbmods;
<!--end of intermod.redecl.module-->]]>
<!-- Document hierarchy ............ -->
<!ENTITY % dbhier.module "INCLUDE">
<![ %dbhier.module; [
<!ENTITY % dbhier PUBLIC
"-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN"
"dbhierx.mod">
%dbhier;
]]>
<!-- ...................................................................... -->
<!-- Other general entities ............................................... -->
<!ENTITY % dbgenent.module "INCLUDE">
<![ %dbgenent.module; [
<!ENTITY % dbgenent PUBLIC
"-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN"
"dbgenent.mod">
%dbgenent;
]]>
<!-- End of DocBook XML DTD V4.4 .......................................... -->
<!-- ...................................................................... -->
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
<!ENTITY % MainModule SYSTEM "onix-international.elt">
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://java.sun.com/xml/ns/j2ee"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.4">
<xsd:import schemaLocation="j2ee_1_4.xsd"/>
<redefine schemaLocation="jsp_2_0.xsd"/>
</xsd:schema>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
</beans>
@@ -0,0 +1,67 @@
<!-- "Fetch External Resource" "true" -->
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xs:schema
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">
<xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.1" schemaLocation="geronimo-naming-1.1.xsd"/>
<xs:import namespace="http://geronimo.apache.org/xml/ns/security-1.1" schemaLocation="geronimo-security-1.1.xsd"/>
<xs:import namespace="http://geronimo.apache.org/xml/ns/deployment-1.1" schemaLocation="geronimo-module-1.1.xsd"/>
<xs:element name="web-app" type="web:web-appType"/>
<xs:complexType name="web-appType">
<xs:sequence>
<xs:element ref="sys:environment" minOccurs="0"/>
<xs:element name="context-root" type="xs:string" minOccurs="0"/>
<!--<xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>-->
<xs:element ref="naming:web-container" minOccurs="0"/>
<xs:element name="container-config" type="web:container-configType" minOccurs="0"/>
<xs:group ref="naming:jndiEnvironmentRefsGroup"/>
<xs:element ref="naming:message-destination" minOccurs="0" maxOccurs="unbounded"/>
<xs:sequence minOccurs="0">
<xs:element name="security-realm-name" type="xs:string"/>
<xs:element ref="security:security" minOccurs="0"/>
</xs:sequence>
<xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="container-configType">
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://jboss.com/products/seam/mail"
xmlns:mail="http://jboss.com/products/seam/mail"
xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
<xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="http://jboss.com/products/seam/components-1.2.xsd"/>
<xs:attributeGroup name="attlist.mailSession">
<xs:attribute name="username" type="xs:string"/>
<xs:attribute name="password" type="xs:string"/>
<xs:attribute name="host" type="xs:string"/>
<xs:attribute name="port" type="xs:string"/>
<xs:attribute name="debug" type="xs:string"/>
<xs:attribute name="ssl" type="xs:boolean"/>
<xs:attribute name="session-jndi-name" type="xs:string"/>
</xs:attributeGroup>
<xs:element name="mail-session">
<xs:complexType>
<xs:attributeGroup ref="components:attlist.component" />
<xs:attributeGroup ref="mail:attlist.mailSession" />
</xs:complexType>
</xs:element>
</xs:schema>
@@ -0,0 +1 @@
<tag xmlns="http://nowhere.com<caret>" />
@@ -0,0 +1,3 @@
<!DOCTYPE tag PUBLIC "x3" "http://my<caret>file">
<tag />
@@ -0,0 +1,5 @@
<!-- "Fetch External Resource" "true" -->
<rap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="myschema http://www.inversoft.com/sche<caret>mas/rap/rap-config-1.0.xsd">
</rap>
@@ -0,0 +1,5 @@
<!-- "Fetch External Resource" "true" -->
<rap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.inversoft.com/sche<caret>mas/rap/rap-config-1.0.xsd">
</rap>
@@ -0,0 +1,9 @@
<!-- "Fetch External Resource" "true" -->
<jsp:root version="2.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:a4j="https://ajax4<caret>jsf.dev.java.net/ajax"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
@@ -0,0 +1,11 @@
<!-- "Fetch External Resource" "true" -->
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.inversoft.com/schemas/savant-2.0/project"
xmlns:project="http://www.inversoft.com/schemas/savant-2.0/project"
xmlns:base="http://www.inversoft.com/schemas/savant-2.0/base">
<xsd:import namespace="http://www.inversoft.com/schema<caret>s/savant-2.0/base" />
</xsd:schema>
@@ -0,0 +1,3 @@
<!-- "Fetch External Resource" "true" -->
<project default="aaa" xmlns:z="http://nowhere.com2<caret>"/>
@@ -0,0 +1,3 @@
<!-- "Fetch External Resource" "true" -->
<tag xmlns="http://nowhere.com<caret>" />
@@ -0,0 +1,5 @@
<!-- "Fetch External Resource" "true" -->
<!DOCTYPE tag PUBLIC "x3" "http://my<caret>file">
<tag />
@@ -0,0 +1,5 @@
<!-- "Fetch External Resource" "true" -->
<rap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="myschema http://www.inversoft.com/sche<caret>mas/rap/rap-config-1.0.xsd">
</rap>
@@ -0,0 +1,5 @@
<!-- "Fetch External Resource" "true" -->
<rap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.inversoft.com/sche<caret>mas/rap/rap-config-1.0.xsd">
</rap>
@@ -0,0 +1,9 @@
<!-- "Fetch External Resource" "true" -->
<jsp:root version="2.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:a4j="https://ajax4<caret>jsf.dev.java.net/ajax"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
@@ -0,0 +1,11 @@
<!-- "Fetch External Resource" "true" -->
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.inversoft.com/schemas/savant-2.0/project"
xmlns:project="http://www.inversoft.com/schemas/savant-2.0/project"
xmlns:base="http://www.inversoft.com/schemas/savant-2.0/base">
<xsd:import namespace="http://www.inversoft.com/schema<caret>s/savant-2.0/base" />
</xsd:schema>
@@ -0,0 +1,3 @@
<!-- "Fetch External Resource" "true" -->
<project default="aaa" xmlns:z="http://nowhere.com2<caret>"/>
@@ -0,0 +1 @@
<foo xmlns="urn:macromedia-extension" />
@@ -0,0 +1 @@
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
@@ -0,0 +1,3 @@
<!-- "Ignore External Resource" "true" -->
<foo xmlns="urn:macro<caret>media-extension" />
@@ -0,0 +1,3 @@
<!-- "Ignore External Resource" "true" -->
<!DOCTYPE log4j:configuration SYSTEM "log<caret>4j.dtd">
@@ -0,0 +1 @@
<!DOCTYPE log4j:configuration SYSTEM "lo<caret>g4j.dtd">
@@ -0,0 +1 @@
<foo xmlns="urn:macro<caret>media-extension" />
@@ -0,0 +1,2 @@
<!-- "Manually Setup External Resource" "true" -->
<!DOCTYPE log4j:configuration SYSTEM "lo<caret>g4j.dtd">
@@ -0,0 +1,2 @@
<!-- "Manually Setup External Resource" "true" -->
<foo xmlns="urn:macro<caret>media-extension" />