summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-07-18 11:15:45 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-07-18 11:15:45 +0000
commitf826a45e68300b410baf7c97c10317a924e85e85 (patch)
treeccbb59e2f10c4c3682b62e5f7cf2d1158f85444d /tests
parentec2ba02de64d6e7ff3b24a17eec265c696d992a0 (diff)
downloadlibxslt-f826a45e68300b410baf7c97c10317a924e85e85.tar.gz
libxslt-f826a45e68300b410baf7c97c10317a924e85e85.tar.bz2
libxslt-f826a45e68300b410baf7c97c10317a924e85e85.zip
applied patch from Shaun McCance to implement exslt:split c.f. #117752
* libexslt/strings.c: applied patch from Shaun McCance to implement exslt:split c.f. #117752 * tests/exslt/strings/Makefile.am tests/exslt/strings/split.1.*: added the test to the regression suite. Daniel
Diffstat (limited to 'tests')
-rw-r--r--tests/exslt/strings/Makefile.am3
-rw-r--r--tests/exslt/strings/split.1.out13
-rw-r--r--tests/exslt/strings/split.1.xml1
-rw-r--r--tests/exslt/strings/split.1.xsl23
4 files changed, 39 insertions, 1 deletions
diff --git a/tests/exslt/strings/Makefile.am b/tests/exslt/strings/Makefile.am
index 78732c17..5ccb5a8e 100644
--- a/tests/exslt/strings/Makefile.am
+++ b/tests/exslt/strings/Makefile.am
@@ -5,7 +5,8 @@ $(top_builddir)/xsltproc/xsltproc:
EXTRA_DIST = \
tokenize.1.xml tokenize.1.xsl tokenize.1.out \
- tokenize.2.xml tokenize.2.xsl tokenize.2.out
+ tokenize.2.xml tokenize.2.xsl tokenize.2.out \
+ split.1.xml split.1.xsl split.1.out
all:
diff --git a/tests/exslt/strings/split.1.out b/tests/exslt/strings/split.1.out
new file mode 100644
index 00000000..9166a2cf
--- /dev/null
+++ b/tests/exslt/strings/split.1.out
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<out>;
+ str:split('a, simple, list', ', ')
+ <token>a</token><token>simple</token><token>list</token>
+
+ str:split('data math str')
+ <token>data</token><token>math</token><token>str</token>
+
+ str:split('foobar', '')
+ <token>f</token><token>o</token><token>o</token><token>b</token><token>a</token><token>r</token>
+
+ str:split('-*- hello - world -*-', '-')
+ <token>*</token><token> hello </token><token> world </token><token>*</token></out>
diff --git a/tests/exslt/strings/split.1.xml b/tests/exslt/strings/split.1.xml
new file mode 100644
index 00000000..69d62f2c
--- /dev/null
+++ b/tests/exslt/strings/split.1.xml
@@ -0,0 +1 @@
+<doc/>
diff --git a/tests/exslt/strings/split.1.xsl b/tests/exslt/strings/split.1.xsl
new file mode 100644
index 00000000..42d88d58
--- /dev/null
+++ b/tests/exslt/strings/split.1.xsl
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:str="http://exslt.org/strings"
+ exclude-result-prefixes="str">
+
+<xsl:template match="/">
+<out>;
+ str:split('a, simple, list', ', ')
+ <xsl:copy-of select="str:split('a, simple, list', ', ')"/>
+
+ str:split('data math str')
+ <xsl:copy-of select="str:split('data math str')"/>
+
+ str:split('foobar', '')
+ <xsl:copy-of select="str:split('foobar', '')"/>
+
+ str:split('-*- hello - world -*-', '-')
+ <xsl:copy-of select="str:split('-*- hello - world -*-', '-')"/>
+</out>
+</xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file