Add test with multiple tokens in an argument

This commit is contained in:
kimsnj 2018-11-09 21:35:01 +01:00 committed by David Peter
parent 34b8c0df73
commit 32ec7afc3a
1 changed files with 17 additions and 0 deletions

View File

@ -217,4 +217,21 @@ mod tests {
}
);
}
#[test]
fn tokens_multiple() {
assert_eq!(
CommandTemplate::new(&["cp", "{}", "{/.}.ext"]),
CommandTemplate {
args: vec![
ArgumentTemplate::Text("cp".into()),
ArgumentTemplate::Tokens(vec![Token::Placeholder]),
ArgumentTemplate::Tokens(vec![
Token::BasenameNoExt,
Token::Text(".ext".into())
]),
],
}
);
}
}