Mercurial > hg4j
diff test/org/tmatesoft/hg/test/ExecHelper.java @ 570:36853bb80a35
Tests for HgAnnotateCommand with follow/no-follow option
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 11 Apr 2013 16:07:17 +0200 |
parents | 7f27122011c3 |
children |
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/ExecHelper.java Wed Apr 10 20:04:54 2013 +0200 +++ b/test/org/tmatesoft/hg/test/ExecHelper.java Thu Apr 11 16:07:17 2013 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012 TMate Software Ltd + * Copyright (c) 2011-2013 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,13 +19,14 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.StringTokenizer; import org.tmatesoft.hg.internal.ProcessExecHelper; /** - * + * Utility to run a command line application and to parse its output * @author Artem Tikhomirov * @author TMate Software Ltd. */ @@ -61,11 +62,15 @@ return super.prepareCommand(cmd); } - public void run(String... cmd) throws IOException, InterruptedException { + public void run(List<String> cmd) throws IOException, InterruptedException { CharSequence res = super.exec(cmd); parser.parse(res); } + public void run(String... cmd) throws IOException, InterruptedException { + run(Arrays.asList(cmd)); + } + public int getExitValue() { return super.exitValue(); }