From 6a7286e95ef91c74df87454a7e1b81fb13fabf90 Mon Sep 17 00:00:00 2001 From: Cameron Stitt Date: Fri, 1 Dec 2017 11:07:07 +1000 Subject: [PATCH] Add env test for ternary condition --- interpolation/funcs_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interpolation/funcs_test.go b/interpolation/funcs_test.go index 6331d86..3ad7b65 100644 --- a/interpolation/funcs_test.go +++ b/interpolation/funcs_test.go @@ -113,6 +113,11 @@ func TestInterpolationFuncEnv(t *testing.T) { expectation: "", evalError: true, }, + { + description: "Empty env ternary", + text: `${env("FOO") != "" ? env("FOO") : "bar"}`, + expectation: "bar", + }, } envTestFunc := testInterpolationFunc("env", interpolationFuncEnv)