diff --git a/fixtures/equals.env b/fixtures/equals.env new file mode 100644 index 0000000..594c532 --- /dev/null +++ b/fixtures/equals.env @@ -0,0 +1,2 @@ +export OPTION_A='postgres://localhost:5432/database?sslmode=disable' + diff --git a/godotenv_test.go b/godotenv_test.go index e1ac87f..c6d9f2d 100644 --- a/godotenv_test.go +++ b/godotenv_test.go @@ -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{