Adding a package-version test
authorabraaksm
Thu, 07 Jul 2016 14:42:07 +0200
changeset 1377 74b05bf683fc
parent 1376 8d4827915750
child 1378 e70f90dc955e
Adding a package-version test
.hgignore
tests/attr/package-version/_package-version-test-set.xml
tests/attr/package-version/package-version-004.xsl
--- a/.hgignore	Thu Jul 07 14:41:44 2016 +0200
+++ b/.hgignore	Thu Jul 07 14:42:07 2016 +0200
@@ -19,3 +19,4 @@
 xgespraŐąch.xml
 tests/sandp/tempresult.xml
 tests/insn/sort/sort-0001.xsl
+tests/misc/aspiring/report-overview.html
--- a/tests/attr/package-version/_package-version-test-set.xml	Thu Jul 07 14:41:44 2016 +0200
+++ b/tests/attr/package-version/_package-version-test-set.xml	Thu Jul 07 14:42:07 2016 +0200
@@ -29,7 +29,7 @@
    </test-case>
    
    <test-case name="package-version-003">
-      <description>Basic package-version test, with a more complex version</description>
+      <description>Basic package-version test, with a NamePart</description>
       <created by="Abel Braaksma" on="2016-06-06"/>     
       <test>
          <stylesheet file="package-version-003.xsl"/>
@@ -39,6 +39,28 @@
       </result>
    </test-case>
    
+   <test-case name="package-version-004">
+      <description>Basic package-version test, with a longer NamePart</description>
+      <created by="Abel Braaksma" on="2016-06-06"/>     
+      <test>
+         <stylesheet file="package-version-004.xsl"/>
+      </test>
+      <result>
+         <assert>package-version = "1.0-alpha-beta-gamma"</assert>
+      </result>
+   </test-case>
+   
+   <test-case name="package-version-005">
+      <description>Basic package-version test, with a NamePart having all NCName characters</description>
+      <created by="Abel Braaksma" on="2016-06-06"/>     
+      <test>
+         <stylesheet file="package-version-004.xsl"/>
+      </test>
+      <result>
+         <assert>package-version = "1.0-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"</assert>
+      </result>
+   </test-case>
+   
    
    <test-case name="package-version-900">
       <description>Basic package-version test, error scenario, not allowed on xsl:stylesheet</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/package-version/package-version-004.xsl	Thu Jul 07 14:42:07 2016 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:package xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    package-version="1.0-alpha-beta-gamma"
+    version="3.0">
+    
+    <xsl:output omit-xml-declaration="yes" />
+    
+    <xsl:template name="xsl:initial-template">
+        <package-version>
+            <xsl:value-of select="doc('')//@package-version" />
+        </package-version>
+    </xsl:template>
+    
+</xsl:package>
\ No newline at end of file