You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by lg...@apache.org on 2005/09/02 11:01:07 UTC

svn commit: r267165 - in /cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg: JXTemplateGeneratorTestCase.java formatNumber-output.xml formatNumber.xml

Author: lgawron
Date: Fri Sep  2 02:00:54 2005
New Revision: 267165

URL: http://svn.apache.org/viewcvs?rev=267165&view=rev
Log:
formatNumber test case

Added:
    cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber-output.xml   (with props)
    cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber.xml   (with props)
Modified:
    cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java

Modified: cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java?rev=267165&r1=267164&r2=267165&view=diff
==============================================================================
--- cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java (original)
+++ cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.java Fri Sep  2 02:00:54 2005
@@ -140,4 +140,12 @@
         getFlowContext().put("date", cal.getTime());
         assertEqual(load(outputURI), generate(JX, inputURI, EMPTY_PARAMS));
     }
+
+    public void testFormatNumber() throws Exception {
+        String inputURI = docBase + "formatNumber.xml";
+        String outputURI = docBase + "formatNumber-output.xml";
+
+        getFlowContext().put("value", new Double(979.0101));
+        assertEqual(load(outputURI), generate(JX, inputURI, EMPTY_PARAMS));
+    }
 }

Added: cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber-output.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber-output.xml?rev=267165&view=auto
==============================================================================
--- cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber-output.xml (added)
+++ cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber-output.xml Fri Sep  2 02:00:54 2005
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+	<number locale="pl_PL">979,01</number>
+	<number locale="en_US">979.01</number>
+</root>

Propchange: cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber-output.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber.xml?rev=267165&view=auto
==============================================================================
--- cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber.xml (added)
+++ cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber.xml Fri Sep  2 02:00:54 2005
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<root xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+	<number locale="pl_PL"><jx:formatNumber value="${value}" locale="pl_PL"/></number>
+	<number locale="en_US"><jx:formatNumber value="${value}" locale="en_US"/></number>
+</root>

Propchange: cocoon/blocks/template/trunk/test/org/apache/cocoon/template/jxtg/formatNumber.xml
------------------------------------------------------------------------------
    svn:eol-style = native