Closed Bug 819271 Opened 10 years ago Closed 10 years ago

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

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 20.0

People

(Reporter: mcsmurf, Assigned: aceman)

References

Details

Attachments

(1 file)

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.
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
Attached patch patchSplinter Review
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)
Status: NEW → ASSIGNED
OS: Windows 7 → All
Hardware: x86_64 → All
Attachment #690011 - Flags: review?(mbanner) → review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/dc8656a6ee72
Status: ASSIGNED → RESOLVED
Closed: 10 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.