diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-15 01:10:15 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-15 01:10:15 +0300 |
commit | 933654fbae37b3726cfa449d187759fe06f8fcc7 (patch) | |
tree | 8d961c269665d77a814a8e2cbbd415997b3d2897 /test/cmd_line.cpp | |
parent | cmd_line.cpp: move implementation from cmd_line.hpp (diff) | |
download | winapi-common-933654fbae37b3726cfa449d187759fe06f8fcc7.tar.gz winapi-common-933654fbae37b3726cfa449d187759fe06f8fcc7.zip |
test/ -> test/unit_tests/
Diffstat (limited to 'test/cmd_line.cpp')
-rw-r--r-- | test/cmd_line.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/test/cmd_line.cpp b/test/cmd_line.cpp deleted file mode 100644 index 4506304..0000000 --- a/test/cmd_line.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com> -// This file is part of the "winapi-common" project. -// For details, see https://github.com/egor-tensin/winapi-common. -// Distributed under the MIT License. - -#include <winapi/cmd_line.hpp> - -#include <boost/test/unit_test.hpp> - -#include <string> - -BOOST_AUTO_TEST_SUITE(cmd_line_tests) - -BOOST_AUTO_TEST_CASE(query) { - const auto cmd_line = winapi::CommandLine::query(); - BOOST_TEST(cmd_line.has_argv0()); - BOOST_TEST_MESSAGE(cmd_line.get_argv0()); -} - -BOOST_AUTO_TEST_CASE(escape) { - wchar_t* argv[] = { - L"test.exe", - L"arg1 arg2", - LR"(path\to\file)", - LR"(path\to\dir\)", - LR"(weird\\argument)", - }; - const auto cmd_line = winapi::CommandLine::build_from_main(5, argv); - const auto expected = - R"("test.exe" "arg1 arg2" "path\to\file" "path\to\dir\\" "weird\\argument")"; - BOOST_TEST(cmd_line.join() == expected); -} - -BOOST_AUTO_TEST_SUITE_END() |