mirror of
https://github.com/joho/godotenv.git
synced 2025-05-06 15:39:51 +00:00
Merge pull request #3 from ys/feature/accept-equals-in-values
Use SplitN instead of split
This commit is contained in:
commit
3c13a80fe1
2
fixtures/equals.env
Normal file
2
fixtures/equals.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export OPTION_A='postgres://localhost:5432/database?sslmode=disable'
|
||||||
|
|
@ -93,6 +93,15 @@ func TestLoadExportedEnv(t *testing.T) {
|
|||||||
loadEnvAndCompareValues(t, envFileName, expectedValues)
|
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) {
|
func TestLoadQuotedEnv(t *testing.T) {
|
||||||
envFileName := "fixtures/quoted.env"
|
envFileName := "fixtures/quoted.env"
|
||||||
expectedValues := map[string]string{
|
expectedValues := map[string]string{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user