| 73 | } // namespace |
| 74 | |
| 75 | int cpp_main(int argc, char*[]) |
| 76 | { |
| 77 | if (argc > 1) |
| 78 | cleanup = false; |
| 79 | |
| 80 | // test narrow characters |
| 81 | std::cout << "narrow character tests:\n"; |
| 82 | test(fs::unique_path("narrow_fopen_test-%%%%-%%%%.txt")); |
| 83 | |
| 84 | // So that tests are run with known encoding, use Boost UTF-8 codecvt |
| 85 | std::locale global_loc = std::locale(); |
| 86 | std::locale loc(global_loc, new fs::detail::utf8_codecvt_facet()); |
| 87 | fs::path::imbue(loc); |
| 88 | |
| 89 | // test with some wide characters |
| 90 | // \u2780 is circled 1 against white background == e2 9e 80 in UTF-8 |
| 91 | // \u2781 is circled 2 against white background == e2 9e 81 in UTF-8 |
| 92 | // \u263A is a white smiling face |
| 93 | std::cout << "\nwide character tests:\n"; |
| 94 | std::wstring ws(L"wide_fopen_test_"); |
| 95 | ws.push_back(static_cast< wchar_t >(0x2780)); |
| 96 | ws.push_back(static_cast< wchar_t >(0x263A)); |
| 97 | ws.append(L"-%%%%-%%%%.txt"); |
| 98 | test(fs::unique_path(ws)); |
| 99 | |
| 100 | return ::boost::report_errors(); |
| 101 | } |
nothing calls this directly
no test coverage detected