diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e54da91..a5ad7fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -439,7 +439,22 @@ jobs: - name: Setup ICU shell: pwsh - run: 'Add-Content $Env:BOOST_ROOT/project-config.jam "path-constant ICU_PATH : `"$($pwd.Path)\ICU`" ;"' + run: | + $icuPath = (Join-Path $pwd "ICU") -replace '\\', '/' + + if (-not (Test-Path $icuPath)) { + Write-Error "ICU directory not found at $icuPath" + exit 1 + } + + Get-ChildItem $icuPath | ForEach-Object { Write-Host " $_" } + Write-Host "" + + $jamPath = Join-Path $env:BOOST_ROOT "project-config.jam" + Add-Content $jamPath "path-constant ICU_PATH : `"$icuPath`" ;" + + Write-Host "Contents of project-config.jam:" + Get-Content $jamPath | ForEach-Object { Write-Host " $_" } - name: Run tests (WinAPI, without coverage) if: '!matrix.coverage' @@ -478,8 +493,12 @@ jobs: - name: Show config before collecting coverage if: matrix.coverage run: | + type %BOOST_ROOT%\project-config.jam set B2_TARGETS=libs/%SELF%/test//show_config --verbose-test - ci\build.bat + set B2_FLAGS=--debug-configuration + ci\build.bat || exit /b 1 + echo Config log: + type %BOOST_ROOT%/bin.v2/config.log env: B2_TOOLSET: ${{matrix.toolset}} B2_CXXSTD: ${{matrix.cxxstd}} diff --git a/test/show_config.cpp b/test/show_config.cpp index 56b592c..34f7fb1 100644 --- a/test/show_config.cpp +++ b/test/show_config.cpp @@ -40,8 +40,8 @@ const char* env(const char* s) # pragma warning(pop) #endif if(r) - return r; - return ""; + return r; // LCOV_EXCL_LINE + return ""; // LCOV_EXCL_LINE } void check_locales(const std::vector& names) @@ -59,12 +59,18 @@ void check_locales(const std::vector& names) void test_main(int /*argc*/, char** /*argv*/) { - std::cerr << "- char8_t: "; + std::cerr << "- Character support: "; + std::cerr << (sizeof(wchar_t) * 8) << "bit-wchar_t "; #ifdef __cpp_char8_t - std::cerr << "yes\n"; -#else - std::cerr << "no\n"; + std::cerr << "char8_t "; #endif +#ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cerr << "char16_t "; +#endif +#ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cerr << "char32_t "; +#endif + std::cerr << std::endl; std::cerr << "- std::basic_string: "; #ifdef __cpp_lib_char8_t std::cerr << "yes\n"; @@ -90,6 +96,7 @@ void test_main(int /*argc*/, char** /*argv*/) #else std::cerr << "- Without iconv\n"; #endif + std::cerr << "- Environment \n"; std::cerr << " LANG=" << env("LANG") << std::endl; std::cerr << " LC_ALL=" << env("LC_ALL") << std::endl; diff --git a/test/test_encoding.cpp b/test/test_encoding.cpp index 8bfcf7a..05c8e3c 100644 --- a/test/test_encoding.cpp +++ b/test/test_encoding.cpp @@ -341,7 +341,7 @@ struct utfutf { if(iConvUsesWTF8()) { static char buf[16] = "\x67\x72\xF9\x80\x80\x80\x80" "üßen"; - return buf; + return buf; // LCOV_EXCL_LINE } else { return utfutf::ok(); } @@ -464,8 +464,8 @@ void test_utf_for() if(iConvUsesWTF8() && utfutf::bad_decoded_to_utf8() != utfutf::ok()) { // Run just this one test, as there won't be an error reported so the "stop" tests will fail. // Other backends might do it correctly but we can't pass multiple expected results here. - TEST_EQ(boost::locale::conv::from_utf(utfutf::bad(), "UTF-8"), - utfutf::bad_decoded_to_utf8()); + TEST_EQ(boost::locale::conv::from_utf(utfutf::bad(), "UTF-8"), // LCOV_EXCL_LINE + utfutf::bad_decoded_to_utf8()); // LCOV_EXCL_LINE } else test_error_from_utf(utfutf::bad(), utfutf::bad_decoded_to_utf8(), "UTF-8"); std::cout << "-- Error for decoding to Latin1" << std::endl; @@ -476,7 +476,7 @@ void test_utf_for() std::string expected = utfutf::bad_char_decoded_to_utf8(); expected += expected; // 2 bad chars if(iConvUsesWTF8() && utfutf::bad_decoded_to_utf8() != utfutf::ok()) - TEST_EQ(boost::locale::conv::from_utf(onlyInvalidUtf, "UTF-8"), expected); + TEST_EQ(boost::locale::conv::from_utf(onlyInvalidUtf, "UTF-8"), expected); // LCOV_EXCL_LINE else test_error_from_utf(onlyInvalidUtf, expected, "UTF-8"); std::cout << "-- Error decoding string of only invalid chars to Latin1" << std::endl;