diff --git a/tests/env-file-tests/.env b/tests/env-file-tests/.env new file mode 100644 index 0000000..0c167ce --- /dev/null +++ b/tests/env-file-tests/.env @@ -0,0 +1,2 @@ +ZZVAR1='This value is overwritten by env-file-tests/.env' +ZZVAR3='This value is loaded from env-file-tests/.env' diff --git a/tests/env-file-tests/.gitignore b/tests/env-file-tests/.gitignore new file mode 100644 index 0000000..e157843 --- /dev/null +++ b/tests/env-file-tests/.gitignore @@ -0,0 +1,4 @@ +# This overrides the repository root .gitignore (ignoring all .env). +# The .env files in this directory are important for the test cases. +!.env +!project/.env diff --git a/tests/env-file-tests/project/.env b/tests/env-file-tests/project/.env new file mode 100644 index 0000000..cc2c0ce --- /dev/null +++ b/tests/env-file-tests/project/.env @@ -0,0 +1,2 @@ +ZZVAR1='This value is loaded but should be overwritten' +ZZVAR2='This value is loaded from .env in project/ directory'