Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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}}
Expand Down
19 changes: 13 additions & 6 deletions test/show_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const char*>& names)
Expand All @@ -59,12 +59,18 @@ void check_locales(const std::vector<const char*>& 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<char8_t>: ";
#ifdef __cpp_lib_char8_t
std::cerr << "yes\n";
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions test/test_encoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ struct utfutf<wchar_t, 4> {
if(iConvUsesWTF8()) {
static char buf[16] = "\x67\x72\xF9\x80\x80\x80\x80"
"üßen";
return buf;
return buf; // LCOV_EXCL_LINE
} else {
return utfutf<char>::ok();
}
Expand Down Expand Up @@ -464,8 +464,8 @@ void test_utf_for()
if(iConvUsesWTF8() && utfutf<Char>::bad_decoded_to_utf8() != utfutf<char>::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<Char>(utfutf<Char>::bad(), "UTF-8"),
utfutf<Char>::bad_decoded_to_utf8());
TEST_EQ(boost::locale::conv::from_utf<Char>(utfutf<Char>::bad(), "UTF-8"), // LCOV_EXCL_LINE
utfutf<Char>::bad_decoded_to_utf8()); // LCOV_EXCL_LINE
} else
test_error_from_utf<Char>(utfutf<Char>::bad(), utfutf<Char>::bad_decoded_to_utf8(), "UTF-8");
std::cout << "-- Error for decoding to Latin1" << std::endl;
Expand All @@ -476,7 +476,7 @@ void test_utf_for()
std::string expected = utfutf<Char>::bad_char_decoded_to_utf8();
expected += expected; // 2 bad chars
if(iConvUsesWTF8() && utfutf<Char>::bad_decoded_to_utf8() != utfutf<char>::ok())
TEST_EQ(boost::locale::conv::from_utf<Char>(onlyInvalidUtf, "UTF-8"), expected);
TEST_EQ(boost::locale::conv::from_utf<Char>(onlyInvalidUtf, "UTF-8"), expected); // LCOV_EXCL_LINE
else
test_error_from_utf<Char>(onlyInvalidUtf, expected, "UTF-8");
std::cout << "-- Error decoding string of only invalid chars to Latin1" << std::endl;
Expand Down