test_formatFileSize.js fails on systems that use a decimal separator different from "."

RESOLVED FIXED in Thunderbird 20.0

Status

MailNews Core
Backend
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mcsmurf, Assigned: aceman)

Tracking

Trunk
Thunderbird 20.0
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Bug 779736 introduced a new test for the formatFileSize method (mailnews/base/test/unit/test_formatFileSize.js). This test fails on systems that use a decimal separator different from ".", for example when using a system with German locale (it uses ","). As test failure you get something like:
TEST-UNEXPECTED-FAIL | c:/mozilla/tree-hg/objdirs/seamonkey-objdir-debug-tests/mozilla/_tests/xpcshell/mailnews/base/test/unit/test_formatFileSize.js | 1,0 KB == 1.0 KB - See following stack:
[...]

I guess this has to do with Bug 668756 being fixed a few weeks ago.
(Assignee)

Comment 1

4 years ago
I am not sure how to access the locale C functions from this JS test.
Could we just accept the result if there is any non-numeric character in place of the decimal separator?
Assignee: nobody → acelists
Blocks: 668756
(Assignee)

Comment 2

4 years ago
Created attachment 690011 [details] [diff] [review]
patch

This is the implementation of my proposal. Actually I get the test failure on my machine (non English) so I see the test passes after the patch.
Attachment #690011 - Flags: review?(mbanner)
(Assignee)

Updated

4 years ago
Status: NEW → ASSIGNED
OS: Windows 7 → All
Hardware: x86_64 → All
Attachment #690011 - Flags: review?(mbanner) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/dc8656a6ee72
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 20.0
You need to log in before you can comment on or make changes to this bug.