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:
16
cli/src/invocation/cmd/version.rs
Normal file
16
cli/src/invocation/cmd/version.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use failure::Fallible;
|
||||
|
||||
pub(crate) fn execute() -> Fallible<()> {
|
||||
println!("TaskChampion {}", env!("CARGO_PKG_VERSION"));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_version() {
|
||||
execute().unwrap();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user