Procédure de test avec plusieurs cas dans le main
This commit is contained in:
parent
de900a725a
commit
6eb0a0b0c6
1 changed files with 13 additions and 4 deletions
17
src/main.rs
17
src/main.rs
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue