app, prowocessing: move dev commands to tests

This commit is contained in:
Schrottkatze 2024-02-27 13:14:00 +01:00
parent 0705702d4a
commit 18309ec919
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc
2 changed files with 30 additions and 37 deletions

View file

@ -60,38 +60,11 @@ mod dev {
use clap::Subcommand;
#[derive(Subcommand)]
pub(crate) enum DevCommands {
Enums { test_str: String },
Add { num0: i32, num1: i32 },
}
pub(crate) enum DevCommands {}
impl DevCommands {
pub fn run(self) {
match self {
DevCommands::Enums { test_str } => {
use prowocessing::experimental::enum_based::PipelineBuilder;
let upr = PipelineBuilder::new()
.insert(prowocessing::experimental::enum_based::Instruction::Uppercase)
.build();
let lwr = PipelineBuilder::new()
.insert(prowocessing::experimental::enum_based::Instruction::Lowercase)
.build();
println!("Upr: {}", upr.run(test_str.clone()));
println!("Lwr: {}", lwr.run(test_str.clone()));
}
DevCommands::Add { num0, num1 } => {
use prowocessing::experimental::trait_based::pipeline::PipelineBuilder;
let pipe = PipelineBuilder::new().add(1).stringify().build();
println!(
"{:?}",
pipe.run(vec![&num0.into(), &num1.into()].into())
.into_inner()[0]
);
}
}
println!("There are currently no dev commands.");
}
}
}