diff --git a/cmd/sup/main_test.go b/cmd/sup/main_test.go index 80d354c..4fbedbb 100644 --- a/cmd/sup/main_test.go +++ b/cmd/sup/main_test.go @@ -10,6 +10,7 @@ import ( "time" "github.com/adammck/venv" + "os/exec" ) const ( @@ -545,13 +546,20 @@ commands: func TestInventory(t *testing.T) { t.Parallel() + cmd := exec.Command("/bin/sh", "-c", "echo \"server0\n# comment\n\nserver2\n\"") + stdoutStderr, err := cmd.CombinedOutput() + t.Log(string(stdoutStderr)) + if err != nil { + t.Fatal(err) + } + input := ` --- version: 0.4 networks: staging: - inventory: array=( 0 2 ); for i in "${array[@]}"; do printf "server$i\n\n# comment\n"; done + inventory: echo "server0\n# comment\n\nserver2\n" commands: step1: