mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-22 20:23:09 +02:00
Switch to a command-line API closer to TaskWarrior
* Use a parser (rather than clap) to process the command line * Outline some generic support for filtering, reporting, modifying, etc. * Break argument parsing strictly from invocation, to allow independent testing
This commit is contained in:
parent
87bb829634
commit
2c579b9f01
45 changed files with 1720 additions and 1072 deletions
|
@ -2,8 +2,8 @@ use assert_cmd::prelude::*;
|
|||
use predicates::prelude::*;
|
||||
use std::process::Command;
|
||||
|
||||
// This tests that the task binary is running and parsing arguments. The details of subcommands
|
||||
// are handled with unit tests.
|
||||
// NOTE: This tests that the task binary is running and parsing arguments. The details of
|
||||
// subcommands are handled with unit tests.
|
||||
|
||||
#[test]
|
||||
fn help() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
@ -36,7 +36,7 @@ fn invalid_option() -> Result<(), Box<dyn std::error::Error>> {
|
|||
cmd.arg("--no-such-option");
|
||||
cmd.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains("USAGE"));
|
||||
.stderr(predicate::str::contains("command line not recognized"));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue