Merge pull request #3 from ys/feature/accept-equals-in-values

Use SplitN instead of split
pull/4/head
John Barton 2014-03-10 14:25:32 +11:00
commit 3c13a80fe1
2 changed files with 11 additions and 0 deletions

2
fixtures/equals.env Normal file
View File

@ -0,0 +1,2 @@
export OPTION_A='postgres://localhost:5432/database?sslmode=disable'

View File

@ -93,6 +93,15 @@ func TestLoadExportedEnv(t *testing.T) {
loadEnvAndCompareValues(t, envFileName, expectedValues)
}
func TestLoadEqualsEnv(t *testing.T) {
envFileName := "fixtures/equals.env"
expectedValues := map[string]string{
"OPTION_A": "postgres://localhost:5432/database?sslmode=disable",
}
loadEnvAndCompareValues(t, envFileName, expectedValues)
}
func TestLoadQuotedEnv(t *testing.T) {
envFileName := "fixtures/quoted.env"
expectedValues := map[string]string{