-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #674 from jonathanperret/fix/673/run_allow_equals_…
…in_env_value fix(run): allow an equals sign (=) in env var values
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package apps | ||
|
||
import "testing" | ||
|
||
func TestParseEnvVar(t *testing.T) { | ||
ctx := &runContext{} | ||
if env, err := ctx.buildEnv([]string{"TEST=abc"}); err != nil { | ||
t.Fatal(err) | ||
} else if env["TEST"] != "abc" { | ||
t.Fatal(env["TEST"], "should be abc") | ||
} | ||
} | ||
|
||
func TestParseEnvVarWithEqualSign(t *testing.T) { | ||
ctx := &runContext{} | ||
if env, err := ctx.buildEnv([]string{"TEST=a=b"}); err != nil { | ||
t.Fatal(err) | ||
} else if env["TEST"] != "a=b" { | ||
t.Fatal(env["TEST"], "should be a=b") | ||
} | ||
} |