Add test for a trivial case of format-date/time
authorMichael Kay <mike@saxonica.com>
Thu, 04 Feb 2016 18:58:31 +0000
changeset 1234 b645114952a6
parent 1233 39a12908ebb1
child 1235 d1fcc93d1fdb
Add test for a trivial case of format-date/time
tests/fn/format-date/_format-date-test-set.xml
tests/fn/format-date/format-date-036.xsl
--- a/tests/fn/format-date/_format-date-test-set.xml	Thu Feb 04 17:18:42 2016 +0000
+++ b/tests/fn/format-date/_format-date-test-set.xml	Thu Feb 04 18:58:31 2016 +0000
@@ -583,4 +583,19 @@
          </any-of>
       </result>
    </test-case>
+   
+   <test-case name="format-date-036">
+      <description>XSLT 2.0: test format-dateTime: Trivial strings with no date components</description>
+      <created by="Michael Kay" on="2016-02-04"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="format-date-036.xsl"/>
+         <initial-template name="main"/>
+      </test>
+      <result>
+         <assert>/out = "  [QQQ]"</assert>
+      </result>
+   </test-case>
 </test-set>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fn/format-date/format-date-036.xsl	Thu Feb 04 18:58:31 2016 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0" exclude-result-prefixes="xs">
+  <?spec xslt#format-dateTime?>
+  <!-- PURPOSE: XSLT 2.0: test format-date/Time: trivial cases -->
+  <xsl:template name="main">
+    <out>
+      <xsl:value-of select="format-date(current-date(), '')"/>
+      <xsl:value-of select="format-time(current-time(), '  ')"/>
+      <xsl:value-of select="format-dateTime(current-dateTime(), '[[QQQ]]')"/>
+    </out>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file