Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: make tests locale independent #631

Closed
sim642 opened this Issue Dec 23, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@sim642
Copy link
Contributor

sim642 commented Dec 23, 2015

Currently when I run the tests on my computer I get the following two failures:

>>>>>>>>>> TESTS >>>>>>>>>>
......
/home/simmo/weechat/tests/unit/core/test-util.cpp:93: error: Failure in TEST(Util, GetTimeString)
    expected <Sat, 01 Jan 2000 00:00:00>
    but was  <L, 01 jaan  2000 00:00:00>
    difference starts at position 0 at: <          L, 01 jaan>
                                                   ^

...............
/home/simmo/weechat/tests/unit/core/test-string.cpp:1021: error: Failure in TEST(String, FormatSize)
    expected <10.0 KB>
    but was  <10,0 KB>
    difference starts at position 2 at: <        10,0 KB     >
                                                   ^

.............................
.............................
Errors (2 failures, 79 tests, 79 ran, 1922 checks, 0 ignored, 0 filtered out, 3 ms)

<<<<<<<<<< TESTS <<<<<<<<<<

Both of these appear to be caused by the locale I use in my system but tests shouldn't depend on the locale.

@flashcode

This comment has been minimized.

Copy link
Member

flashcode commented Dec 23, 2015

The tests are supposed to be locale independent, see this code: https://github.com/weechat/weechat/blob/master/tests/tests.cpp#L126

How are you running tests?

@sim642

This comment has been minimized.

Copy link
Contributor Author

sim642 commented Dec 23, 2015

I saw that code but something about it isn't working I think.

In the build directory I just run ./tests/tests.

@flashcode flashcode added the bug label Dec 24, 2015

@flashcode flashcode self-assigned this Dec 24, 2015

@sim642

This comment has been minimized.

Copy link
Contributor Author

sim642 commented Dec 25, 2015

Closed by 415dea5.

@sim642 sim642 closed this Dec 25, 2015

@flashcode flashcode added this to the 1.4 milestone Dec 25, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.