Fixes env: remove square braces and evaluate shell (#62)

Fixes bug #61, and makes `env` work more similar to `vars` by allowing
dynamic shell values to be evaluated as part of `CompiledTask`.
This commit is contained in:
Sindre Røkenes Myren
2017-08-16 13:04:58 +02:00
committed by Andrey Nering
parent 300376b0b1
commit 72bfd94329
5 changed files with 66 additions and 40 deletions

View File

@@ -54,6 +54,18 @@ func (fct fileContentTest) Run(t *testing.T) {
}
func TestEnv(t *testing.T) {
tt := fileContentTest{
Dir: "testdata/env",
Target: "default",
TrimSpace: false,
Files: map[string]string{
"env.txt": "GOOS='linux' GOARCH='amd64' CGO_ENABLED='0'\n",
},
}
tt.Run(t)
}
func TestVars(t *testing.T) {
tt := fileContentTest{
Dir: "testdata/vars",