diff options
author | alex-sh <alex-sh@yandex-team.ru> | 2022-02-10 16:50:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:03 +0300 |
commit | 88ee78b1a163eaddee7e880ac73943456040fce0 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/getopt | |
parent | 3196904c9f5bf7aff7374eeadcb0671589581f61 (diff) | |
download | ydb-88ee78b1a163eaddee7e880ac73943456040fce0.tar.gz |
Restoring authorship annotation for <alex-sh@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt')
-rw-r--r-- | library/cpp/getopt/small/last_getopt.h | 6 | ||||
-rw-r--r-- | library/cpp/getopt/small/modchooser.cpp | 2 | ||||
-rw-r--r-- | library/cpp/getopt/ut/last_getopt_ut.cpp | 20 |
3 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/getopt/small/last_getopt.h b/library/cpp/getopt/small/last_getopt.h index 48c394a546..07687bc914 100644 --- a/library/cpp/getopt/small/last_getopt.h +++ b/library/cpp/getopt/small/last_getopt.h @@ -75,12 +75,12 @@ namespace NLastGetopt { Target->insert(Target->end(), NPrivate::OptFromString<TValue>(val, parser->CurOpt())); }); } - } - + } + private: TContainer* Target; char Delim; - }; + }; template <class TpFunc> struct TOptKVHandler: public IOptHandler { diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp index 136830c4d2..2fa5cfd070 100644 --- a/library/cpp/getopt/small/modchooser.cpp +++ b/library/cpp/getopt/small/modchooser.cpp @@ -72,7 +72,7 @@ TModChooser::TMode::TMode(const TString& name, TMainClass* main, const TString& TModChooser::TModChooser() : ModesHelpOption("-?") // Default help option in last_getopt , VersionHandler(nullptr) - , ShowSeparated(true) + , ShowSeparated(true) , SvnRevisionOptionDisabled(false) , PrintShortCommandInUsage(false) { diff --git a/library/cpp/getopt/ut/last_getopt_ut.cpp b/library/cpp/getopt/ut/last_getopt_ut.cpp index 25dd7db82c..c99a1d053d 100644 --- a/library/cpp/getopt/ut/last_getopt_ut.cpp +++ b/library/cpp/getopt/ut/last_getopt_ut.cpp @@ -493,20 +493,20 @@ Y_UNIT_TEST_SUITE(TLastGetoptTests) { } Y_UNIT_TEST(TestRangeSplitValue) { - TOptsNoDefault opts; + TOptsNoDefault opts; TVector<ui32> vals; opts.AddLongOption('s', "split").RangeSplitHandler(&vals, ',', '-'); TOptsParseResultTestWrapper r(&opts, V({"prog", "--split=1,8-10", "--split=12-14"})); UNIT_ASSERT_EQUAL(vals.size(), 7); - UNIT_ASSERT_EQUAL(vals[0], 1); - UNIT_ASSERT_EQUAL(vals[1], 8); - UNIT_ASSERT_EQUAL(vals[2], 9); - UNIT_ASSERT_EQUAL(vals[3], 10); - UNIT_ASSERT_EQUAL(vals[4], 12); - UNIT_ASSERT_EQUAL(vals[5], 13); - UNIT_ASSERT_EQUAL(vals[6], 14); - } - + UNIT_ASSERT_EQUAL(vals[0], 1); + UNIT_ASSERT_EQUAL(vals[1], 8); + UNIT_ASSERT_EQUAL(vals[2], 9); + UNIT_ASSERT_EQUAL(vals[3], 10); + UNIT_ASSERT_EQUAL(vals[4], 12); + UNIT_ASSERT_EQUAL(vals[5], 13); + UNIT_ASSERT_EQUAL(vals[6], 14); + } + Y_UNIT_TEST(TestParseArgs) { TOptsNoDefault o("AbCx:y:z::"); UNIT_ASSERT_EQUAL(o.GetCharOption('A').HasArg_, NO_ARGUMENT); |