summaryrefslogtreecommitdiff
path: root/svl/qa/unit/svl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/qa/unit/svl.cxx')
-rw-r--r--svl/qa/unit/svl.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 557c9be639e6..06d018f3b624 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1449,6 +1449,18 @@ void Test::testUserDefinedNumberFormats()
sExpected = "-575 540/697";
checkPreviewString(aFormatter, sCode, -575.774749601315, eLang, sExpected);
}
+ { // tdf#153887: integer value without integer part displayed
+ sCode = "#/?";
+ sExpected = "2/1";
+ checkPreviewString(aFormatter, sCode, 1.95, eLang, sExpected);
+ checkPreviewString(aFormatter, sCode, 2.00, eLang, sExpected);
+ checkPreviewString(aFormatter, sCode, 2.05, eLang, sExpected);
+ sCode = "0/8";
+ sExpected = "16/8";
+ checkPreviewString(aFormatter, sCode, 1.95, eLang, sExpected);
+ checkPreviewString(aFormatter, sCode, 2.00, eLang, sExpected);
+ checkPreviewString(aFormatter, sCode, 2.05, eLang, sExpected);
+ }
{ // tdf#102507: left alignment of denominator
sCode = "# ?/???";
sExpected = "3 1/2 ";