Fix OptionParser test.
GitOrigin-RevId: d50bdcc78c49313861777c1abfdef24e5e69b2b3
This commit is contained in:
parent
7754e80572
commit
959ecf3c91
@ -15,11 +15,12 @@ TEST(OptionParser, run) {
|
|||||||
td::OptionParser options;
|
td::OptionParser options;
|
||||||
options.set_description("test description");
|
options.set_description("test description");
|
||||||
|
|
||||||
|
td::string exename = "exename";
|
||||||
td::vector<td::string> args;
|
td::vector<td::string> args;
|
||||||
auto run_option_parser = [&](td::string command_line) {
|
auto run_option_parser = [&](td::string command_line) {
|
||||||
args = td::full_split(command_line, ' ');
|
args = td::full_split(command_line, ' ');
|
||||||
td::vector<char *> argv;
|
td::vector<char *> argv;
|
||||||
argv.push_back("exename");
|
argv.push_back(&exename[0]);
|
||||||
for (auto &arg : args) {
|
for (auto &arg : args) {
|
||||||
argv.push_back(&arg[0]);
|
argv.push_back(&arg[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user