summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2024-09-17 23:29:12 +0200
committerJo-Philipp Wich <jo@mein.io>2024-09-20 08:56:16 +0200
commit86f11211dc77cdd86209049692f83286dad73ad5 (patch)
tree7bcf670c1146f8cab546d273c15a1b6cd899bfe5
parent7af80d986f836396977e25ccf2487414fc080400 (diff)
lib: test if call to getenv() destroys environ
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
-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 --