summaryrefslogtreecommitdiff
path: root/test/libapt/commandline_test.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-10-25 23:45:09 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-04 18:04:04 +0100
commit011188e3920f21e6883c2dab956b3d4fb4e8cbfa (patch)
tree9649094789cf2369d82758e24995feb2b0bed59c /test/libapt/commandline_test.cc
parent2b0660b537581e9e65180e4cf1a94d763fd66847 (diff)
generate commands array after config is loaded
This ensures that location strings loaded from a location specified via configuration (Dir::Locale) effect the help messages for commands. Git-Dch: Ignore
Diffstat (limited to 'test/libapt/commandline_test.cc')
-rw-r--r--test/libapt/commandline_test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/libapt/commandline_test.cc b/test/libapt/commandline_test.cc
index 627f1b486..0da2ba45f 100644
--- a/test/libapt/commandline_test.cc
+++ b/test/libapt/commandline_test.cc
@@ -96,7 +96,7 @@ TEST(CommandLineTest,GetCommand)
char const * argv[] = { "apt-get", "-t", "unstable", "remove", "-d", "foo" };
char const * com = CommandLine::GetCommand(Cmds, sizeof(argv)/sizeof(argv[0]), argv);
EXPECT_STREQ("remove", com);
- std::vector<CommandLine::Args> Args = getCommandArgs("apt-get", com);
+ std::vector<CommandLine::Args> Args = getCommandArgs(APT_CMD::APT_GET, com);
::Configuration c;
CommandLine CmdL(Args.data(), &c);
ASSERT_TRUE(CmdL.Parse(sizeof(argv)/sizeof(argv[0]), argv));
@@ -110,7 +110,7 @@ TEST(CommandLineTest,GetCommand)
char const * argv[] = {"apt-get", "-t", "unstable", "remove", "--", "-d", "foo" };
char const * com = CommandLine::GetCommand(Cmds, sizeof(argv)/sizeof(argv[0]), argv);
EXPECT_STREQ("remove", com);
- std::vector<CommandLine::Args> Args = getCommandArgs("apt-get", com);
+ std::vector<CommandLine::Args> Args = getCommandArgs(APT_CMD::APT_GET, com);
::Configuration c;
CommandLine CmdL(Args.data(), &c);
ASSERT_TRUE(CmdL.Parse(sizeof(argv)/sizeof(argv[0]), argv));
@@ -125,7 +125,7 @@ TEST(CommandLineTest,GetCommand)
char const * argv[] = {"apt-get", "-t", "unstable", "--", "remove", "-d", "foo" };
char const * com = CommandLine::GetCommand(Cmds, sizeof(argv)/sizeof(argv[0]), argv);
EXPECT_STREQ("remove", com);
- std::vector<CommandLine::Args> Args = getCommandArgs("apt-get", com);
+ std::vector<CommandLine::Args> Args = getCommandArgs(APT_CMD::APT_GET, com);
::Configuration c;
CommandLine CmdL(Args.data(), &c);
ASSERT_TRUE(CmdL.Parse(sizeof(argv)/sizeof(argv[0]), argv));
@@ -140,7 +140,7 @@ TEST(CommandLineTest,GetCommand)
char const * argv[] = {"apt-get", "install", "-t", "unstable", "--", "remove", "-d", "foo" };
char const * com = CommandLine::GetCommand(Cmds, sizeof(argv)/sizeof(argv[0]), argv);
EXPECT_STREQ("install", com);
- std::vector<CommandLine::Args> Args = getCommandArgs("apt-get", com);
+ std::vector<CommandLine::Args> Args = getCommandArgs(APT_CMD::APT_GET, com);
::Configuration c;
CommandLine CmdL(Args.data(), &c);
ASSERT_TRUE(CmdL.Parse(sizeof(argv)/sizeof(argv[0]), argv));