mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
integration test command
This commit is contained in:
parent
3c97fc37e1
commit
2fc3e5ed93
4 changed files with 39 additions and 1 deletions
13
src/args.rs
13
src/args.rs
|
|
@ -45,6 +45,10 @@ pub enum HazeArgs {
|
|||
Fmt {
|
||||
path: String,
|
||||
},
|
||||
Integration {
|
||||
options: CloudOptions,
|
||||
args: Vec<String>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
|
|
@ -103,6 +107,12 @@ impl HazeArgs {
|
|||
let args = args.map(S::into).collect();
|
||||
Ok(HazeArgs::Test { options, args })
|
||||
}
|
||||
HazeCommand::Integration => {
|
||||
let mut args = args.peekable();
|
||||
let options = CloudOptions::parse(&mut args)?;
|
||||
let args = args.map(S::into).collect();
|
||||
Ok(HazeArgs::Integration { options, args })
|
||||
}
|
||||
HazeCommand::Exec => {
|
||||
let mut args = args.peekable();
|
||||
|
||||
|
|
@ -171,6 +181,7 @@ pub enum HazeCommand {
|
|||
Logs,
|
||||
Open,
|
||||
Fmt,
|
||||
Integration,
|
||||
}
|
||||
|
||||
impl FromStr for HazeCommand {
|
||||
|
|
@ -190,6 +201,7 @@ impl FromStr for HazeCommand {
|
|||
"open" => Ok(HazeCommand::Open),
|
||||
"fmt" => Ok(HazeCommand::Fmt),
|
||||
"format" => Ok(HazeCommand::Fmt),
|
||||
"integration" => Ok(HazeCommand::Integration),
|
||||
_ => Err(Report::msg(format!("Unknown command: {}", s))),
|
||||
}
|
||||
}
|
||||
|
|
@ -209,6 +221,7 @@ impl HazeCommand {
|
|||
HazeCommand::Logs => true,
|
||||
HazeCommand::Open => true,
|
||||
HazeCommand::Fmt => false,
|
||||
HazeCommand::Integration => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue