[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    tests/kxpathtests/tests
From:       Frans Englich <frans.englich () telia ! com>
Date:       2006-05-31 23:43:37
Message-ID: 1149119017.705472.11188.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 547150 by englich:

Fix tests for the optional validate/schema import features.


 M  +16 -14    schemaimport.xml  
 M  +31 -1     validate.xml  


--- trunk/tests/kxpathtests/tests/schemaimport.xml #547149:547150
@@ -1,43 +1,45 @@
 <test-collection xmlns="tag:kde.org,2004:KXQTS:InputCatalog">
 	<!-- LOOKCLOSER -->
 	<test-case description="Schema import binding to no namespace, and no location hint."
-		errorCode="XQST0009"
+		errorCode="XQST0009 XQST0059"
 		type="fail-statically"
-		>import(::)schema(::) "http://example.com/"; 1 eq 1
+		>import(::)schema(::) "http://example.com/NSNOTRECOGNIZED"; 1 eq 1
 	</test-case>
 	<test-case description="Schema import binding to no namespace, but has a location hint."
-		errorCode="XQST0009"
+		errorCode="XQST0009 XQST0059"
 		type="fail-statically"
-		>import(::)schema(::) "http://example.com/" at "example.com/"; 1 eq 1
+		>import(::)schema(::) "http://example.com/NSNOTRECOGNIZED" at "example.com/DOESNOTEXIST"; 1 eq 1
 	</test-case>
 	<test-case description="Schema import binding to no namespace, but has three location hints."
-		errorCode="XQST0009"
+		errorCode="XQST0009 XQST0059"
 		type="fail-statically"
-		>import(::)schema(::)"http://example.com/"(::)at(::)"example.com/",
+		>import(::)schema(::)"http://example.com/NSNOTRECOGNIZED"(::)at(::)"example.com/DOESNOTEXIST",
 			 (::)"example.com/2",(::)"example.com/3"; 1 eq 1
 	</test-case>
 
 	<test-case description="Schema import binding to no namespace, but has three location hints."
-		errorCode="XQST0009"
+		errorCode="XQST0009 XQST0059"
 		type="fail-statically"
-		>import(::)schema(::)"http://example.com/"(::)at(::)"example.com/",
+		>import(::)schema(::)"http://example.com/NSNOTRECOGNIZED"(::)at(::)"example.com/DOESNOTEXIST",
 			 (::)"example.com/2", "example.com/3"; 1 eq 1
 	</test-case>
 
 	<test-case description="Schema import binding to a namespace, and has three location hints."
-		errorCode="XQST0009"
+		errorCode="XQST0009 XQST0059"
 		type="fail-statically"
-		>import(::)schema(::)namespace(::)prefix(::)=(::)"http://example.com/"(::)
-		at(::)"example.com/",(::)"example.com/2", "example.com/3"; 1 eq 1
+		>import(::)schema(::)namespace(::)prefix(::)=(::)"http://example.com/NSNOTRECOGNIZED"(::)
+		at(::)"example.com/DOESNOTEXIST",(::)"example.com/2DOESNOTEXIST",
+		"example.com/3DOESNOTEXIST"; 1 eq 1
 	</test-case>
 
 	<test-case description="Schema import binding to the default element namespace,
 		and has three location hints."
-		errorCode="XQST0009"
+		errorCode="XQST0009 XQST0059"
 		type="fail-statically"
 		>import(::)schema(::)(::)default(::)element(::)namespace
-		(::)"http://example.com/"(::)
-		at(::)"example.com/",(::)"example.com/2", "example.com/3"; 1 eq 1
+		(::)"http://example.com/NSNOTRECOGNIZED"(::)
+		at(::)"example.com/DOESNOTEXIST",(::)"example.com/2DOESNOTEXIST",
+		"example.com/3DOESNOTEXIST"; 1 eq 1
 	</test-case>
 
 	<test-case description="':=' cannot be used to assing namespaces in 'import schema'."
--- trunk/tests/kxpathtests/tests/validate.xml #547149:547150
@@ -1,7 +1,37 @@
 <?xml version="1.0"?>
 <test-collection xmlns="tag:kde.org,2004:KXQTS:InputCatalog">
 	<test-case type="fail-statically" description="A 'validate' expression with an invalid operand."
-		errorCode="XQTY0030">
+		errorCode="XQTY0030 XQST0075">
 		validate { 1 }
 	</test-case>
+
+	<test-case type="fail-statically" description="A 'validate' expression with an invalid operand."
+		errorCode="XQTY0030 XQST0075">
+		validate { () }
+	</test-case>
+
+	<test-case type="fail-statically" description="A 'validate' expression with an invalid operand."
+		errorCode="XQTY0030 XQST0075">
+		validate lax { 1 }
+	</test-case>
+
+	<test-case type="fail-statically" description="A 'validate' expression with an invalid operand."
+		errorCode="XQTY0030 XQST0075">
+		validate strict { 1 }
+	</test-case>
+
+	<test-case type="fail-statically" description="A 'validate' expression with an invalid operand."
+		errorCode="XPST0003 XQST0075">
+		validate lax {  }
+	</test-case>
+
+	<test-case type="fail-statically" description="A 'validate' expression with an invalid operand."
+		errorCode="XPST0003 XQST0075">
+		validate strict {  }
+	</test-case>
+
+	<test-case type="fail-statically" description="A 'validate' expression with an invalid operand."
+		errorCode="XPST0003 XQST0075">
+		validate {  }
+	</test-case>
 </test-collection>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic