Skip to content

Commit

Permalink
Add test_set_locale_on_initialize to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Aug 20, 2024
1 parent 6389570 commit 9af40bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Test
runs-on: ${{ matrix.platform }}
env:
RUST_I18N_DEBUG: 1
RUST_I18N_DEBUG: 0
steps:
- uses: actions/checkout@v3
- name: Setup | Cache Cargo
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ release\:cli:
release:
cargo release
test:
cargo test -p rust-i18n test_set_locale_on_initialize
cargo test --workspace
cargo test --manifest-path examples/app-workspace/Cargo.toml --workspace
cargo test --manifest-path examples/share-in-workspace/Cargo.toml --workspace
3 changes: 2 additions & 1 deletion tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ mod tests {
);
}

// https://github.com/longbridgeapp/rust-i18n/issues/87
#[test]
fn test_set_locale() {
fn test_set_locale_on_initialize() {
rust_i18n::set_locale("zh-CN");
for _ in 0..5 {
assert_eq!(t!("hello"), "Bar - 你好世界!");
Expand Down

0 comments on commit 9af40bb

Please sign in to comment.