Fix OptionParser test.

GitOrigin-RevId: d50bdcc78c49313861777c1abfdef24e5e69b2b3
This commit is contained in:
levlam 2020-06-17 07:00:42 +03:00
parent 7754e80572
commit 959ecf3c91

View File

@ -15,11 +15,12 @@ TEST(OptionParser, run) {
td::OptionParser options;
options.set_description("test description");
td::string exename = "exename";
td::vector<td::string> args;
auto run_option_parser = [&](td::string command_line) {
args = td::full_split(command_line, ' ');
td::vector<char *> argv;
argv.push_back("exename");
argv.push_back(&exename[0]);
for (auto &arg : args) {
argv.push_back(&arg[0]);
}