diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2018-04-24 00:54:42 -0400 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2018-05-02 19:22:59 -0400 |
| commit | 2fefe92d679d1f28a0f8a7d11f224a1e784a366e (patch) | |
| tree | 3c67c38a5f8204d6245925b0350d78b68ffe7596 /test | |
| parent | 03cbf49cd896e55a2fb9c02f07c0c231e221c39b (diff) | |
Execute additional command after --
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/basic_test.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/integration/basic_test.go b/test/integration/basic_test.go index c0a52a0b..2565341b 100644 --- a/test/integration/basic_test.go +++ b/test/integration/basic_test.go @@ -1,4 +1,4 @@ -//+build integration +// +build integration //+build !windows package integration @@ -152,3 +152,15 @@ func (s *BasicSuite) TestUnknownArgErrors(c *C) { result := icmd.RunCommand(GomplateBin, "-in", "flibbit") result.Assert(c, icmd.Expected{ExitCode: 1, Out: `unknown command "flibbit" for "gomplate"`}) } + +func (s *BasicSuite) TestExecCommand(c *C) { + out := s.tmpDir.Join("out") + result := icmd.RunCmd(icmd.Command(GomplateBin, + "-i", `{{print "hello world"}}`, + "-o", out, + "--", "cat", out)) + result.Assert(c, icmd.Expected{ + ExitCode: 0, + Out: "hello world", + }) +} |
