diff options
Diffstat (limited to 'test/read_directory')
-rw-r--r-- | test/read_directory/reference.xml | 35 | ||||
-rw-r--r-- | test/read_directory/transformation.xsl | 10 |
2 files changed, 36 insertions, 9 deletions
diff --git a/test/read_directory/reference.xml b/test/read_directory/reference.xml index 94e639e..4c1000b 100644 --- a/test/read_directory/reference.xml +++ b/test/read_directory/reference.xml @@ -1,10 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> <test_case> -<item>common</item> -<item>default_params</item> -<item>external_text_formatter</item> -<item>read_directory</item> -<item>read_file</item> -<item>read_xml_file</item> -<item>transform</item> +<item type="file"> +<name>Session</name> +</item> +<item type="file"> +<name>check</name> +<extension>.sh</extension> +</item> +<item type="directory"> +<name>common</name> +</item> +<item type="directory"> +<name>default_params</name> +</item> +<item type="directory"> +<name>external_text_formatter</name> +</item> +<item type="directory"> +<name>read_directory</name> +</item> +<item type="directory"> +<name>read_file</name> +</item> +<item type="directory"> +<name>read_xml_file</name> +</item> +<item type="directory"> +<name>transform</name> +</item> </test_case> diff --git a/test/read_directory/transformation.xsl b/test/read_directory/transformation.xsl index 5bcace1..9a9a057 100644 --- a/test/read_directory/transformation.xsl +++ b/test/read_directory/transformation.xsl @@ -9,8 +9,14 @@ <xsl:include href="[testcase.xsl]"/> <xsl:template name="implementation"> - <xsl:for-each select="InputXSLT:read-directory('../')[@type='directory']"> - <item><xsl:value-of select="name"/></item> + <xsl:for-each select="InputXSLT:read-directory('../')"> + <item type="{@type}"> + <name><xsl:value-of select="./name"/></name> + + <xsl:if test="@type='file' and ./name='check'"> + <extension><xsl:value-of select="./extension"/></extension> + </xsl:if> + </item> </xsl:for-each> </xsl:template> |