summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tests/custom/99_bugs/46_getenv_destroys_environ13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/custom/99_bugs/46_getenv_destroys_environ b/tests/custom/99_bugs/46_getenv_destroys_environ
new file mode 100644
index 0000000..1879dee
--- /dev/null
+++ b/tests/custom/99_bugs/46_getenv_destroys_environ
@@ -0,0 +1,13 @@
+A call to getenv() without parameters destroys environ, and subsequent calls
+to getenv() (with or without parameter) return nothing.
+
+-- Testcase --
+{%
+ getenv();
+ print(length(getenv()) > 0, '\n');
+%}
+-- End --
+
+-- Expect stdout --
+true
+-- End --