]> git.saurik.com Git - apt.git/blob - test/libapt/commandline_test.cc
a37fb022023392955a12d428e21c1fac98565498
[apt.git] / test / libapt / commandline_test.cc
1 #include <apt-pkg/cmndline.h>
2
3 #include "assert.h"
4
5 int main()
6 {
7 CommandLine::Args Args[] = {
8 { 't', 0, "Test::Worked", 0 },
9 { 'z', "zero", "Test::Zero", 0 },
10 {0,0,0,0}
11 };
12
13 CommandLine CmdL(Args,_config);
14 char const * argv[] = { "test", "--zero", "-t" };
15 CmdL.Parse(3 , argv);
16
17 equals(true, _config->FindB("Test::Worked", false));
18 equals(true, _config->FindB("Test::Zero", false));
19
20 return 0;
21 }