From da3d5153d159f27f08e7c171330ba06995573f1f Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 28 May 2023 23:37:53 +0900 Subject: [PATCH] ci: install language pack to test locale --- .github/workflows/main.yml | 5 ++++- tests/test_serialize_file.cpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59c1c72..29d484b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,7 @@ jobs: sudo apt-add-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install libboost-test-dev + sudo apt-get install language-pack-fr # test serializer w/ locale sudo apt-get install ${{ matrix.compiler }} - name: Configure run: | @@ -48,6 +49,7 @@ jobs: sudo apt-add-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install libboost-test-dev + sudo apt-get install language-pack-fr # test serializer w/ locale sudo apt-get install clang-${{ matrix.compiler }} - name: Configure run: | @@ -80,6 +82,7 @@ jobs: sudo apt-add-repository ppa:mhier/libboost-latest sudo apt-get update sudo apt-get install boost1.70 + sudo apt-get install language-pack-fr # test serializer w/ locale sudo apt-get install ${{ matrix.compiler }} - name: Configure run: | @@ -119,6 +122,7 @@ jobs: sudo apt-add-repository ppa:mhier/libboost-latest sudo apt-get update sudo apt-get install boost1.70 + sudo apt-get install language-pack-fr # test serializer w/ locale sudo apt-get install clang-${{ matrix.compiler }} - name: Configure run: | @@ -216,7 +220,6 @@ jobs: - name: Test working-directory: ./build run: | - ./tests/test_literals --log_level=all file --mime-encoding tests/toml/tests/example.toml file --mime-encoding tests/toml/tests/fruit.toml file --mime-encoding tests/toml/tests/hard_example.toml diff --git a/tests/test_serialize_file.cpp b/tests/test_serialize_file.cpp index 0bc7ef1..40cb484 100644 --- a/tests/test_serialize_file.cpp +++ b/tests/test_serialize_file.cpp @@ -375,6 +375,11 @@ BOOST_AUTO_TEST_CASE(test_serialize_under_locale) { setloc = std::string(try_nohyphen); } + // In some envs, fr_FR locale has not been installed. Tests must work even in such a case. +// else +// { +// BOOST_TEST(false); +// } BOOST_TEST_MESSAGE("current locale at the beginning of the test = " << setloc); const std::string str = R"(