Last Comment Bug 819271 - test_formatFileSize.js fails on systems that use a decimal separator different from "."
: test_formatFileSize.js fails on systems that use a decimal separator differen...
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 20.0
Assigned To: :aceman
:
Mentors:
Depends on:
Blocks: 668756
  Show dependency treegraph
 
Reported: 2012-12-07 02:22 PST by Frank Wein [:mcsmurf]
Modified: 2012-12-23 06:17 PST (History)
3 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (1.89 KB, patch)
2012-12-07 17:06 PST, :aceman
standard8: review+
Details | Diff | Review

Description Frank Wein [:mcsmurf] 2012-12-07 02:22:35 PST
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.
Comment 1 :aceman 2012-12-07 02:53:29 PST
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?
Comment 2 :aceman 2012-12-07 17:06:52 PST
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.
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-12-23 06:17:58 PST
https://hg.mozilla.org/comm-central/rev/dc8656a6ee72

Note You need to log in before you can comment on or make changes to this bug.