summary refs log tree commit diff
path: root/stdlib/tst-putenv.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-01-04 07:48:13 +0000
committerUlrich Drepper <drepper@redhat.com>2005-01-04 07:48:13 +0000
commit574b268e7f7a76fe3bcfe389509d9ff91227a860 (patch)
treeee213b8410cd034b34d72858e2488125359dc88f /stdlib/tst-putenv.c
parent3fb2606af3b1ab6e6bef7065c65eaca197d73a89 (diff)
downloadglibc-574b268e7f7a76fe3bcfe389509d9ff91227a860.tar.gz
glibc-574b268e7f7a76fe3bcfe389509d9ff91227a860.tar.xz
glibc-574b268e7f7a76fe3bcfe389509d9ff91227a860.zip
Update.
	* stdlib/Makefile: Add rules to build and run tst-putenv.
	* stdlib/tst-putenv.c: New file.
	* stdlib/tst-putenvmod.c: New file.
Diffstat (limited to 'stdlib/tst-putenv.c')
-rw-r--r--stdlib/tst-putenv.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/stdlib/tst-putenv.c b/stdlib/tst-putenv.c
new file mode 100644
index 0000000000..47513ea42b
--- /dev/null
+++ b/stdlib/tst-putenv.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+static int
+do_test (void)
+{
+  char *p = getenv ("SOMETHING_NOBODY_USES");
+  if (p == NULL)
+    {
+      puts ("envvar not defined");
+      return 1;
+    }
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"