Procédure de test avec plusieurs cas dans le main

This commit is contained in:
Hippolyte Chauvin 2023-10-28 14:47:04 +02:00
parent de900a725a
commit 6eb0a0b0c6

View file

@ -1,9 +1,18 @@
mod parser;
fn main() {
let command_line = String::from("ls -l");
let commands: Vec<&str> = vec![
"ls -l",
" amogus",
"lol ",
" fozafoazngin",
"amogus ",
"je suis fade up la",
" la c'est le bos final ",
];
let command_line_as_array: Vec<String> = parser::parse(&command_line);
println!("{:?}", command_line_as_array);
let commands_iter = commands.iter();
for command in commands_iter {
println!("{:?}", parser::parse(&String::from(*command)));
}
}