Add integration tests for arguments (#42)
There were unit tests, but it seems like a good idea to test this end to end.
This commit is contained in:
parent
f071f75c67
commit
e3aa13e5dd
@ -718,3 +718,31 @@ fn quiet_flag_or_dry_run_flag() {
|
||||
"--dry-run and --quiet may not be used together\n",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn argument_single() {
|
||||
integration_test(
|
||||
&["foo", "ARGUMENT"],
|
||||
"
|
||||
foo A:
|
||||
echo {{A}}
|
||||
",
|
||||
0,
|
||||
"ARGUMENT\n",
|
||||
"echo ARGUMENT\n",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn argument_multiple() {
|
||||
integration_test(
|
||||
&["foo", "ONE", "TWO"],
|
||||
"
|
||||
foo A B:
|
||||
echo A:{{A}} B:{{B}}
|
||||
",
|
||||
0,
|
||||
"A:ONE B:TWO\n",
|
||||
"echo A:ONE B:TWO\n",
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user