Lines Matching defs:cmd

130      *        if <code>cmd</code> is running on a terminal
131 * @param cmd the argument of a keytool command line
134 void test(String input, String cmd) throws Exception {
136 lastCommand = cmd;
140 test(in, cmd);
146 void test(InputStream in, String cmd) throws Exception {
150 System.err.println(cmd);
172 sun.security.tools.keytool.Main.main(("-debug "+cmd).split("\\s+"));
184 * Call this method if you expect test(input, cmd) should go OK
186 void testOK(String input, String cmd) throws Exception {
191 if (cmd.contains("p11-nss.txt") && cmd.contains("-genkey")
192 && !cmd.contains("-keyalg")) {
193 cmd += " -sigalg SHA1withDSA -keysize 1024";
195 test(input, cmd);
197 afterFail(input, cmd, "OK");
203 * Call this method if you expect test(input, cmd) should fail and throw
206 void testFail(String input, String cmd) throws Exception {
209 test(input, cmd);
219 afterFail(input, cmd, "FAIL");
225 * Call this method if you expect test(input, cmd) should go OK
227 void testOK(InputStream is, String cmd) throws Exception {
229 test(is, cmd);
231 afterFail("", cmd, "OK");
237 * Call this method if you expect test(input, cmd) should fail and throw
240 void testFail(InputStream is, String cmd) throws Exception {
243 test(is, cmd);
249 afterFail("", cmd, "FAIL");
258 void testAnyway(String input, String cmd) {
260 test(input, cmd);
269 void afterFail(String input, String cmd, String should) {
270 if (cmd.contains("p11-nss.txt")) {
271 cmd = "-J-Dnss.lib=" + System.getProperty("nss.lib") + " " + cmd;
274 "keytool " + cmd + "\nOr its debug version ---\n" +
275 "keytool -debug " + cmd);