// This test case should be a freebie if the previous ones are already working. // It shows that we can chain method calls on the builder. use builders::Builder; #[derive(Builder)] pub struct Command { executable: String, args: Vec, env: Vec, current_dir: String, } fn main() { let command = Command::builder() .executable("cargo".to_owned()) .args(vec!["build".to_owned(), "--release".to_owned()]) .env(vec![]) .current_dir("..".to_owned()) .build() .unwrap(); assert_eq!(command.executable, "cargo"); }