From 73e1f043b9983537118f6c542f4abf28c5069160 Mon Sep 17 00:00:00 2001 From: Yuyi Wang Date: Fri, 15 Jul 2022 12:15:25 +0800 Subject: [PATCH 1/4] Add test in CI. --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c86ddee..2532d42 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,6 +38,9 @@ jobs: rustup target add wasm32-wasi displayName: "Install targets" + - pwsh: make test + displayName: "Test" + - pwsh: make plugins displayName: "Build plugins" From 108eda531a009753c1f747795ffb3eee97c01e7c Mon Sep 17 00:00:00 2001 From: Berrysoft Date: Tue, 19 Jul 2022 20:56:36 +0800 Subject: [PATCH 2/4] Adjust test for locale::accept --- utils/gal-locale/src/lib.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/utils/gal-locale/src/lib.rs b/utils/gal-locale/src/lib.rs index 04bc7c7..ab76ad9 100644 --- a/utils/gal-locale/src/lib.rs +++ b/utils/gal-locale/src/lib.rs @@ -150,7 +150,6 @@ mod test { #[test] fn accept() { - let current = "zh_CN".parse::().unwrap(); let accepts = [ "en".parse::().unwrap(), "ja".parse().unwrap(), @@ -158,8 +157,20 @@ mod test { "zh_Hant".parse().unwrap(), ]; assert_eq!( - current.choose_from(&accepts).unwrap().unwrap().to_string(), - "zh_Hans" + "zh_CN" + .parse::() + .unwrap() + .choose_from(&accepts) + .unwrap(), + Some("zh_Hans".parse::().unwrap()) + ); + assert_eq!( + "zh_TW" + .parse::() + .unwrap() + .choose_from(&accepts) + .unwrap(), + Some("zh_Hant".parse::().unwrap()) ); } } From 78f913d4c41c98e135ad0e1d3d058686e6c0a948 Mon Sep 17 00:00:00 2001 From: Yuyi Wang Date: Tue, 23 Aug 2022 22:07:42 +0800 Subject: [PATCH 3/4] Remove book test. --- Makefile | 1 - book/Makefile | 2 -- 2 files changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 2bebc2e..5f2afe4 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ .PHONY: test clean update doc serve-book test: plugins cd utils && $(MAKE) test - cd book && $(MAKE) test clean: cd bins && $(MAKE) clean cd utils && $(MAKE) clean diff --git a/book/Makefile b/book/Makefile index 7dcae90..e8cd613 100644 --- a/book/Makefile +++ b/book/Makefile @@ -3,7 +3,5 @@ build: mdbook build serve: mdbook serve --open -test: - mdbook test clean: mdbook clean From 9b9961193cb55386337f09d67700a0fae397943e Mon Sep 17 00:00:00 2001 From: Yuyi Wang Date: Tue, 23 Aug 2022 22:23:58 +0800 Subject: [PATCH 4/4] Test after plugins built. --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 398f213..00896d3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,11 +65,11 @@ jobs: rustup target add wasm32-wasi displayName: "Install targets" - - pwsh: make test - displayName: "Test" - - pwsh: make plugins displayName: "Build plugins" + - pwsh: make test + displayName: "Test" + - pwsh: make release-cross TARGET=$(target) displayName: "Build all"