From e3aa13e5dd507535612173ce20233de4e81a8bb5 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 11 Nov 2016 13:34:28 -0800 Subject: [PATCH] Add integration tests for arguments (#42) There were unit tests, but it seems like a good idea to test this end to end. --- src/integration.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/integration.rs b/src/integration.rs index 21ef925..b463888 100644 --- a/src/integration.rs +++ b/src/integration.rs @@ -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", + ); +}