tballison commented on code in PR #1473:
URL: https://github.com/apache/poi/pull/1473#discussion_r4377209708
##########
poi/src/test/java/org/apache/poi/ss/usermodel/TestDataFormatter.java:
##########
@@ -464,6 +464,15 @@ void testFractionWithLongRun() {
}
}
+ @Test
+ void testFractionWithTextAndLongDenominator() {
+ DataFormatter dfUS = new DataFormatter(Locale.US);
+
+ // text in a fraction goes to CellFormat, where more than 9
denominator digits overflowed and the format threw
+ assertEquals("3: 35580937/251290841",
+ dfUS.formatRawCellContents(Math.PI, -1,
"#\\:??????????/??????????").replaceAll(" +", " "));
+ }
Review Comment:
Instead of 3000000001, the test now expects 6000000001/2, because of the
FractionFormat fallback. Let me know if that's not the right behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]