public void check() {
try {
- String command_line = "diff -u expected/" + getTestName() + " result/" +
- getTestName();
Process proc;
- proc = Runtime.getRuntime().exec(command_line);
+ proc = Runtime.getRuntime().exec(new String[]
+ "diff",
+ "-u",
+ "expected/" + getTestName(),
+ "result/" + getTestName()
+ });
proc.waitFor();
System.out.print(getTestName() + ": ");
if (proc.exitValue() == 0)
String dbname = prop.getProperty("pgpooltest.dbname");
// setup database
- String command_line = "psql -f prepare.sql";
- command_line = command_line + " -h " + host + " -p " + port +
- " -U " + user + " " + dbname;
- Process proc = Runtime.getRuntime().exec(command_line);
+ Process proc = Runtime.getRuntime().exec(new String[]{
+ "psql", "-f", "prepare.sql",
+ "-h", host, "-p", port,
+ "-U", user, dbname
+ });
proc.waitFor();
StringTokenizer tokenizer = new StringTokenizer(tests, " ");