From edbd94d65441164a12dced1f69d8d7c1f3c89470 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 12 Nov 2016 13:03:33 -0800 Subject: [PATCH] Test that overrides are not evaluated (#92) --- src/integration.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/integration.rs b/src/integration.rs index e12c24f..9d9f8d0 100644 --- a/src/integration.rs +++ b/src/integration.rs @@ -559,7 +559,7 @@ fn overrides_first() { foo = "foo" a = "a" baz = "baz" - + recipe arg: echo arg={{arg}} echo {{foo + a + baz}}"#, @@ -569,7 +569,23 @@ recipe arg: ); } -// shebangs are printed +#[test] +fn overrides_not_evaluated() { + integration_test( + &["foo=bar", "a=b", "recipe", "baz=bar"], + r#" +foo = `exit 1` +a = "a" +baz = "baz" + +recipe arg: + echo arg={{arg}} + echo {{foo + a + baz}}"#, + 0, + "arg=baz=bar\nbarbbaz\n", + "echo arg=baz=bar\necho barbbaz\n", + ); +} #[test] fn dry_run() {