From 9af40bb9f1e2f5307ee7b523e1419578de36b9a3 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 20 Aug 2024 19:42:57 +0800 Subject: [PATCH] Add test_set_locale_on_initialize to CI --- .github/workflows/ci.yml | 2 +- Makefile | 1 + tests/integration_tests.rs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd4dbe9..c9b1010 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/Makefile b/Makefile index 2dc1f55..a8878e1 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 18fbd9f..9708930 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -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 - 你好世界!");