]> source.dussan.org Git - poi.git/commitdiff
Add a test to show that bug #53150 has been fixed by the recent fraction work
authorNick Burch <nick@apache.org>
Wed, 26 Jun 2013 20:40:26 +0000 (20:40 +0000)
committerNick Burch <nick@apache.org>
Wed, 26 Jun 2013 20:40:26 +0000 (20:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1497084 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java

index 6dcd6ebebab7fced1a0dfbe1a60a4a3228913d64..2816a488f46bfb509faa129eda1db9fa6422891a 100644 (file)
@@ -248,6 +248,9 @@ public class TestDataFormatter extends TestCase {
        //Bug54868 patch has a hit on the first string before the ";"
        assertEquals("-123 1/3", dfUS.formatRawCellContents(-123.321, -1, "0 ?/?;0"));
 
+       //Bug53150 formatting a whole number with fractions should just give the number
+       assertEquals("1",   dfUS.formatRawCellContents(1.0, -1, "# #/#"));
+       assertEquals("11",   dfUS.formatRawCellContents(11.0, -1, "# #/#"));
     }
     
     /**