diff options
author | diver <diver@yandex-team.ru> | 2022-02-10 16:48:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:07 +0300 |
commit | 7629e1f9ef7f9d2a3c345c97e6a4e5a4b32ee786 (patch) | |
tree | c3371bfa47641a52244267b63009d16e4e7054ff /library/cpp/getopt | |
parent | cc573d2716c99ba22afc98753971cd97fd5283e0 (diff) | |
download | ydb-7629e1f9ef7f9d2a3c345c97e6a4e5a4b32ee786.tar.gz |
Restoring authorship annotation for <diver@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt')
-rw-r--r-- | library/cpp/getopt/small/modchooser.cpp | 4 | ||||
-rw-r--r-- | library/cpp/getopt/ut/last_getopt_ut.cpp | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp index 2fa5cfd070..5595ed8d95 100644 --- a/library/cpp/getopt/small/modchooser.cpp +++ b/library/cpp/getopt/small/modchooser.cpp @@ -181,7 +181,7 @@ int TModChooser::Run(const int argc, const char** argv) const { } if (modeName == "-h" || modeName == "--help" || modeName == "-?") { - PrintHelp(argv[0]); + PrintHelp(argv[0]); return 0; } if (VersionHandler && (modeName == "-v" || modeName == "--version")) { @@ -200,7 +200,7 @@ int TModChooser::Run(const int argc, const char** argv) const { if (modeIter == Modes.end()) { Cerr << "Unknown mode " << modeName.Quote() << "." << Endl; - PrintHelp(argv[0]); + PrintHelp(argv[0]); return 1; } diff --git a/library/cpp/getopt/ut/last_getopt_ut.cpp b/library/cpp/getopt/ut/last_getopt_ut.cpp index c99a1d053d..64b46c7da6 100644 --- a/library/cpp/getopt/ut/last_getopt_ut.cpp +++ b/library/cpp/getopt/ut/last_getopt_ut.cpp @@ -591,19 +591,19 @@ Y_UNIT_TEST_SUITE(TLastGetoptTests) { } Y_UNIT_TEST(TestCustomCmdLineDescr) { - TOpts opts; - const char* prog = "my_program"; + TOpts opts; + const char* prog = "my_program"; TString customDescr = "<FILE|TABLE> USER [OPTIONS]"; - int argc = 2; + int argc = 2; const char* cmd[] = {prog}; - opts.SetCmdLineDescr(customDescr); - TOptsParser parser(&opts, argc, cmd); - TStringStream out; - parser.PrintUsage(out); - // find custom usage + opts.SetCmdLineDescr(customDescr); + TOptsParser parser(&opts, argc, cmd); + TStringStream out; + parser.PrintUsage(out); + // find custom usage UNIT_ASSERT(out.Str().find(customDescr) != TString::npos); - } - + } + Y_UNIT_TEST(TestColorPrint) { TOpts opts; const char* prog = "my_program"; |