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

Fix Locale.Message tests #584

Merged
merged 4 commits into from
Jun 12, 2018
Merged

Fix Locale.Message tests #584

merged 4 commits into from
Jun 12, 2018

Conversation

ujihisa
Copy link
Member

@ujihisa ujihisa commented Jun 10, 2018

4 tests were in pending. I fixed them and made sure all of them passed.

@tyru
Copy link
Member

tyru commented Jun 10, 2018

hmm, I think @thinca is more appropriate reviewer... (Locale.Message's author)

@ujihisa ujihisa requested review from thinca and removed request for tyru June 10, 2018 09:44
@ujihisa
Copy link
Member Author

ujihisa commented Jun 10, 2018

Assigned this to @thinca

@ujihisa
Copy link
Member Author

ujihisa commented Jun 11, 2018

@thinca
BEFORE:

$ themis --runtimepath ~/.vimbundles/vimproc --reporter dot
......................................................................................................................................P..PPP....................................................................................................................................................................................................................................................P....................................................................................................P..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Pending:
  1) Locale.Message .get_lang() returns current language of message
     Need ja_JP.UTF-8 in your system locale

  2) Locale.Message .get() returns translated text if it exists
     Need ja_JP.UTF-8 in your system locale

  3) Locale.Message .get() returns original text if it doesn't exist
     Need ja_JP.UTF-8 in your system locale

  4) Locale.Message ._() can use like `get()`
     Need ja_JP.UTF-8 in your system locale

  5) Data.String .iconv() return {expr} when the conversion completely fails
     Need knowledge about how to force iconv to fail completely

  6) vital vital#{plugin-name}#import() can be called in &statusline
     "themis cannot test statusline "

tests 1364
passes 1358
pendings 6

AFTER:

$ themis --runtimepath ~/.vimbundles/vimproc --reporter dot
...............................................................................................................................................................................................................................................................................................................................................................................................P....................................................................................................P.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Pending:
  1) Data.String .iconv() return {expr} when the conversion completely fails
     Need knowledge about how to force iconv to fail completely

  2) vital vital#{plugin-name}#import() can be called in &statusline
     "themis cannot test statusline "

tests 1362
passes 1360
pendings 2

This explains the benefit

@thinca
Copy link
Member

thinca commented Jun 11, 2018

language message ja_JP.UTF-8 が可能な環境かどうかを Before all 辺りでチェックして、結果を変数に入れておいてよしなにするのがいいかも。

* Check if ja_JP.UTF-8 is available before running each test
@ujihisa
Copy link
Member Author

ujihisa commented Jun 11, 2018

Sounds good. Added ffc5fa5 to do that.

@thinca
Copy link
Member

thinca commented Jun 11, 2018

We can also check en_US.UTF-8 before test.

@ujihisa
Copy link
Member Author

ujihisa commented Jun 12, 2018

Sounds even better. Added 3fed30c to do that!

@thinca
Copy link
Member

thinca commented Jun 12, 2018

Message.Locale: Refactor test

モジュール名変わってる。

Copy link
Member

@thinca thinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@thinca
Copy link
Member

thinca commented Jun 12, 2018

あ、コミットメッセージ…一応直したらマージしてもらえると 🙏

@ujihisa
Copy link
Member Author

ujihisa commented Jun 12, 2018

Oops, I didn't notice that. Thanks @thinca! fixed.

@tyru tyru merged commit 286e6b5 into master Jun 12, 2018
@tyru tyru deleted the locale-message branch June 12, 2018 02:25
@tyru
Copy link
Member

tyru commented Jun 12, 2018

🎉🎉🎉

@ujihisa
Copy link
Member Author

ujihisa commented Jun 12, 2018

🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants