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; mod parser;
fn main() { 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); let commands_iter = commands.iter();
for command in commands_iter {
println!("{:?}", command_line_as_array); println!("{:?}", parser::parse(&String::from(*command)));
}
} }