xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sstei...@apache.org
Subject svn commit: r1753218 - /xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java
Date Mon, 18 Jul 2016 13:23:23 GMT
Author: ssteiner
Date: Mon Jul 18 13:23:23 2016
New Revision: 1753218

URL: http://svn.apache.org/viewvc?rev=1753218&view=rev
Log:
FOP-2462: Test decimal format

Added:
    xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java
  (with props)

Added: xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java?rev=1753218&view=auto
==============================================================================
--- xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java
(added)
+++ xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java
Mon Jul 18 13:23:23 2016
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.fop.render.pdf;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Locale;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdmodel.common.PDStream;
+
+import org.apache.fop.render.pdf.pdfbox.PDFWriter;
+
+public class PDFWriterTestCase {
+    @Test
+    public void testFloat() throws IOException {
+        Locale l = Locale.getDefault();
+        Locale.setDefault(Locale.FRENCH);
+        PDFWriter pdfWriter = new PDFWriter(null, 0);
+        String text = "[1.1 ] a";
+        PDStream pdStream = new PDStream(new PDDocument(), new ByteArrayInputStream(text.getBytes("UTF-8")));
+        Assert.assertEquals(pdfWriter.writeText(pdStream), text + "\n");
+        Locale.setDefault(l);
+    }
+}

Propchange: xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message