From be991fdacd32c7c05ec34a5a579dc925caa9b849 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Fri, 15 Jun 2018 08:38:30 +1000 Subject: [PATCH] Read test --- commands_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/commands_test.go b/commands_test.go index 20e78960..86d2e068 100644 --- a/commands_test.go +++ b/commands_test.go @@ -128,6 +128,15 @@ func TestReadCmd(t *testing.T) { assertResult(t, "2\n", result.Output) } +func TestReadMultiCmd(t *testing.T) { + cmd := getRootCommand() + result := runCmd(cmd, "read -d 1 examples/multiple_docs.yaml another.document") + if result.Error != nil { + t.Error(result.Error) + } + assertResult(t, "here\n", result.Output) +} + func TestReadCmd_ArrayYaml(t *testing.T) { cmd := getRootCommand() result := runCmd(cmd, "read examples/array.yaml [0].gather_facts")