diff options
Diffstat (limited to 'libtests')
-rw-r--r-- | libtests/qtest/qutil/qutil.out | 4 | ||||
-rw-r--r-- | libtests/qutil.cc | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libtests/qtest/qutil/qutil.out b/libtests/qtest/qutil/qutil.out index 5fe841ac..9da8cecf 100644 --- a/libtests/qtest/qutil/qutil.out +++ b/libtests/qtest/qutil/qutil.out @@ -105,3 +105,7 @@ rename file create file rename over existing delete file +---- wmain +ascii +10 ÷ 2 = 5 +qwww÷π diff --git a/libtests/qutil.cc b/libtests/qutil.cc index 935cdfc2..b8429a44 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -543,6 +543,17 @@ void rename_delete_test() assert_no_file("old\xcf\x80.~tmp"); } +void wmain_test() +{ + auto realmain = [](int argc, char* argv[]) { + for (int i = 0; i < argc; ++i) { std::cout << argv[i] << std::endl; } return 0; }; + wchar_t* argv[3]; + argv[0] = const_cast<wchar_t*>(L"ascii"); + argv[1] = const_cast<wchar_t*>(L"10 \xf7 2 = 5"); + argv[2] = const_cast<wchar_t*>(L"qwww\xf7\x03c0"); + QUtil::call_main_from_wmain(3, argv, realmain); +} + int main(int argc, char* argv[]) { try @@ -573,6 +584,8 @@ int main(int argc, char* argv[]) hex_encode_decode_test(); std::cout << "---- rename/delete" << std::endl; rename_delete_test(); + std::cout << "---- wmain" << std::endl; + wmain_test(); } catch (std::exception& e) { |