Home | History | Annotate | Download | only in base

Lines Matching refs:cl

25   CommandLine cl = CommandLine::FromString(
33 EXPECT_FALSE(cl.command_line_string().empty());
42 CommandLine cl(arraysize(argv), argv);
44 EXPECT_FALSE(cl.HasSwitch("cruller"));
45 EXPECT_FALSE(cl.HasSwitch("flim"));
46 EXPECT_FALSE(cl.HasSwitch("program"));
47 EXPECT_FALSE(cl.HasSwitch("dog"));
48 EXPECT_FALSE(cl.HasSwitch("cat"));
49 EXPECT_FALSE(cl.HasSwitch("output-rotation"));
50 EXPECT_FALSE(cl.HasSwitch("not-a-switch"));
51 EXPECT_FALSE(cl.HasSwitch("--"));
54 cl.GetProgram().value());
56 EXPECT_TRUE(cl.HasSwitch("foo"));
57 EXPECT_TRUE(cl.HasSwitch("bar"));
58 EXPECT_TRUE(cl.HasSwitch("baz"));
59 EXPECT_TRUE(cl.HasSwitch("spaetzle"));
61 EXPECT_TRUE(cl.HasSwitch("SPAETZLE"));
63 EXPECT_TRUE(cl.HasSwitch("other-switches"));
64 EXPECT_TRUE(cl.HasSwitch("input-translation"));
66 EXPECT_TRUE(cl.HasSwitch("quotes"));
69 EXPECT_EQ("Crepe", cl.GetSwitchValueASCII("spaetzle"));
70 EXPECT_EQ("", cl.GetSwitchValueASCII("Foo"));
71 EXPECT_EQ("", cl.GetSwitchValueASCII("bar"));
72 EXPECT_EQ("", cl.GetSwitchValueASCII("cruller"));
73 EXPECT_EQ("--dog=canine --cat=feline", cl.GetSwitchValueASCII(
75 EXPECT_EQ("45--output-rotation", cl.GetSwitchValueASCII("input-translation"));
77 EXPECT_EQ(TRICKY, cl.GetSwitchValueNative("quotes"));
80 const std::vector<CommandLine::StringType>& args = cl.args();
96 const std::vector<std::string>& argvec = cl.argv();
107 CommandLine cl = CommandLine::FromString(L"");
108 EXPECT_TRUE(cl.command_line_string().empty());
109 EXPECT_TRUE(cl.GetProgram().empty());
111 CommandLine cl(0, NULL);
112 EXPECT_TRUE(cl.argv().empty());
114 EXPECT_TRUE(cl.args().empty());
129 CommandLine cl(FilePath(FILE_PATH_LITERAL("Program")));
131 cl.AppendSwitch(switch1);
132 cl.AppendSwitchASCII(switch2, value);
133 cl.AppendSwitchASCII(switch3, value3);
134 cl.AppendSwitchASCII(switch4, value4);
135 cl.AppendSwitchASCII(switch5, value5);
137 EXPECT_TRUE(cl.HasSwitch(switch1));
138 EXPECT_TRUE(cl.HasSwitch(switch2));
139 EXPECT_EQ(value, cl.GetSwitchValueASCII(switch2));
140 EXPECT_TRUE(cl.HasSwitch(switch3));
141 EXPECT_EQ(value3, cl.GetSwitchValueASCII(switch3));
142 EXPECT_TRUE(cl.HasSwitch(switch4));
143 EXPECT_EQ(value4, cl.GetSwitchValueASCII(switch4));
144 EXPECT_TRUE(cl.HasSwitch(switch5));
145 EXPECT_EQ(value5, cl.GetSwitchValueASCII(switch5));
154 cl.command_line_string());
190 CommandLine cl(kProgram);
191 EXPECT_EQ(kProgram.value(), cl.GetProgram().value());
194 CommandLine::StringType cmd(cl.command_line_string());
195 CommandLine::StringType program(cl.GetProgram().value());