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:
Casey Rodarmor 2016-11-11 13:34:28 -08:00 committed by GitHub
parent f071f75c67
commit e3aa13e5dd

View File

@ -718,3 +718,31 @@ fn quiet_flag_or_dry_run_flag() {
"--dry-run and --quiet may not be used together\n", "--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",
);
}