Bug Fix - default command, default unit test

- Task runs the default command when no arguments are provided, but
  when an "rc:..." argument is provided, it does not run the default
  command.
- Implemented unit tests to verify the functioning of default commands,
  default project and default priority.
This commit is contained in:
Paul Beckingham 2009-03-14 00:21:42 -04:00
parent 2216eee678
commit 4a524a220e
2 changed files with 86 additions and 1 deletions

View file

@ -774,7 +774,9 @@ std::string runTaskCommand (
// If argc == 1 and the default.command configuration variable is set,
// then use that, otherwise stick with argc/argv.
std::string defaultCommand = conf.get ("default.command");
if (args.size () == 0 && defaultCommand != "")
if ((args.size () == 0 ||
(args.size () == 1 && args[0].substr (0, 3) == "rc:")) &&
defaultCommand != "")
{
// Stuff the command line.
args.clear ();