summaryrefslogtreecommitdiff
path: root/tests/exslt/math
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-04-21 10:56:16 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-04-21 10:56:16 +0000
commit027f8843fc4e0f846d97e55394b52e9c818a92e4 (patch)
tree3c98e536739c9175e3b9a3a0b5d2857eaff28596 /tests/exslt/math
parent3b7f83a5398e0ae76d8531c8b946286ef93d0a18 (diff)
downloadlibxslt-027f8843fc4e0f846d97e55394b52e9c818a92e4.tar.gz
libxslt-027f8843fc4e0f846d97e55394b52e9c818a92e4.tar.bz2
libxslt-027f8843fc4e0f846d97e55394b52e9c818a92e4.zip
applied patch from Charles Bozeman fixing the math power function where
* libexslt/math.c: applied patch from Charles Bozeman fixing the math power function where args were inverted #110996 * tests/exslt/math/Makefile.am tests/exslt/math/power.1.*: added the test to the regraession for #110996 * libexslt/sets.c: avoid a problem with nodesets. Daniel
Diffstat (limited to 'tests/exslt/math')
-rw-r--r--tests/exslt/math/Makefile.am1
-rw-r--r--tests/exslt/math/power.1.out8
-rw-r--r--tests/exslt/math/power.1.xml8
-rw-r--r--tests/exslt/math/power.1.xsl19
4 files changed, 36 insertions, 0 deletions
diff --git a/tests/exslt/math/Makefile.am b/tests/exslt/math/Makefile.am
index 878c0ddd..2e6a1e18 100644
--- a/tests/exslt/math/Makefile.am
+++ b/tests/exslt/math/Makefile.am
@@ -12,6 +12,7 @@ EXTRA_DIST = \
max.1.out max.1.xml max.1.xsl \
max.2.out max.2.xml max.2.xsl \
max.5.out max.5.xml max.5.xsl \
+ prower.1.out power.1.xml power.1.xsl \
min.1.out min.1.xml min.1.xsl \
min.2.out min.2.xml min.2.xsl
diff --git a/tests/exslt/math/power.1.out b/tests/exslt/math/power.1.out
new file mode 100644
index 00000000..6c3f2671
--- /dev/null
+++ b/tests/exslt/math/power.1.out
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<results>
+ <result>1</result>
+ <result>7</result>
+ <result> 2.85311670611e+11</result>
+ <result>256</result>
+ <result>243</result>
+</results>
diff --git a/tests/exslt/math/power.1.xml b/tests/exslt/math/power.1.xml
new file mode 100644
index 00000000..93e04018
--- /dev/null
+++ b/tests/exslt/math/power.1.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<values>
+ <value base="1">7</value>
+ <value base="7">1</value>
+ <value base="11">11</value>
+ <value base="2">8</value>
+ <value base="3">5</value>
+</values>
diff --git a/tests/exslt/math/power.1.xsl b/tests/exslt/math/power.1.xsl
new file mode 100644
index 00000000..aad0bd73
--- /dev/null
+++ b/tests/exslt/math/power.1.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:math="http://exslt.org/math"
+ exclude-result-prefixes="math">
+
+<xsl:template match="values">
+ <results>
+ <xsl:apply-templates/>
+ </results>
+</xsl:template>
+
+<xsl:template match="value">
+ <result>
+ <xsl:value-of select="math:power(./@base,.)" />
+ </result>
+</xsl:template>
+
+</xsl:stylesheet>