summaryrefslogtreecommitdiff
path: root/tests/exslt
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-11-01 06:45:21 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-11-01 06:45:21 +0000
commitfa4f217009816b0f0cff9b1b9729a7dcd5939fc5 (patch)
tree80295ce48a90dbbcc594b61f4414cc4f3f96fdcb /tests/exslt
parent87c1e30beef493a380a7d4a880598729604bff9b (diff)
downloadlibxslt-fa4f217009816b0f0cff9b1b9729a7dcd5939fc5.tar.gz
libxslt-fa4f217009816b0f0cff9b1b9729a7dcd5939fc5.tar.bz2
libxslt-fa4f217009816b0f0cff9b1b9729a7dcd5939fc5.zip
fix bug #125265 about entities breaking exsl:tokenize and exsl:split
* libexslt/strings.c: fix bug #125265 about entities breaking exsl:tokenize and exsl:split * tests/exslt/strings/split.1.* tests/exslt/strings/tokenize.1.*: augmented the reression tests with the example from the bug report. Daniel
Diffstat (limited to 'tests/exslt')
-rw-r--r--tests/exslt/strings/split.1.out5
-rw-r--r--tests/exslt/strings/split.1.xsl5
-rw-r--r--tests/exslt/strings/tokenize.1.out9
-rw-r--r--tests/exslt/strings/tokenize.1.xsl11
4 files changed, 27 insertions, 3 deletions
diff --git a/tests/exslt/strings/split.1.out b/tests/exslt/strings/split.1.out
index 9166a2cf..1fbb470b 100644
--- a/tests/exslt/strings/split.1.out
+++ b/tests/exslt/strings/split.1.out
@@ -10,4 +10,7 @@
<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>
+ <token>*</token><token> hello </token><token> world </token><token>*</token>
+
+ str:split('data &amp;math str;')
+ <token>data</token><token>&amp;math</token><token>str;</token></out>
diff --git a/tests/exslt/strings/split.1.xsl b/tests/exslt/strings/split.1.xsl
index 42d88d58..7958bd1b 100644
--- a/tests/exslt/strings/split.1.xsl
+++ b/tests/exslt/strings/split.1.xsl
@@ -17,7 +17,10 @@
str:split('-*- hello - world -*-', '-')
<xsl:copy-of select="str:split('-*- hello - world -*-', '-')"/>
+
+ str:split('data &amp;math str;')
+ <xsl:copy-of select="str:split('data &amp;math str;')"/>
</out>
</xsl:template>
-</xsl:stylesheet> \ No newline at end of file
+</xsl:stylesheet>
diff --git a/tests/exslt/strings/tokenize.1.out b/tests/exslt/strings/tokenize.1.out
index a521f4bd..debb2516 100644
--- a/tests/exslt/strings/tokenize.1.out
+++ b/tests/exslt/strings/tokenize.1.out
@@ -5,4 +5,13 @@
str:tokenize('date math str')
<token>date</token><token>math</token><token>str</token>;
+
+ str:tokenize('This is &amp; strange behavior', ' ')
+ <token>This</token><token>is</token><token>&amp;</token><token>strange</token><token>behavior</token>;
+
+ str:tokenize('This is &amp; strange; behavior', ' ')
+ <token>This</token><token>is</token><token>&amp;</token><token>strange;</token><token>behavior</token>;
+
+ str:tokenize('This is &amp;strange; behavior', ' ')
+ <token>This</token><token>is</token><token>&amp;strange;</token><token>behavior</token>;
</out>
diff --git a/tests/exslt/strings/tokenize.1.xsl b/tests/exslt/strings/tokenize.1.xsl
index 81de97fe..0e801d02 100644
--- a/tests/exslt/strings/tokenize.1.xsl
+++ b/tests/exslt/strings/tokenize.1.xsl
@@ -11,7 +11,16 @@
str:tokenize('date math str')
<xsl:copy-of select="str:tokenize('date math str')"/>;
+
+ str:tokenize('This is &amp; strange behavior', ' ')
+ <xsl:copy-of select="str:tokenize('This is &amp; strange behavior', ' ')"/>;
+
+ str:tokenize('This is &amp; strange; behavior', ' ')
+ <xsl:copy-of select="str:tokenize('This is &amp; strange; behavior', ' ')"/>;
+
+ str:tokenize('This is &amp;strange; behavior', ' ')
+ <xsl:copy-of select="str:tokenize('This is &amp;strange; behavior', ' ')"/>;
</out>
</xsl:template>
-</xsl:stylesheet> \ No newline at end of file
+</xsl:stylesheet>