about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-12-02 02:27:43 +0000
committerUlrich Drepper <drepper@redhat.com>2008-12-02 02:27:43 +0000
commit30c063710e4fa97b4015ef6d7b01adef0dcd8730 (patch)
treee9c60ce3376d3c7d5f2fd959aaf90a02f68b488a
parent1fa7ae05b99220ac4590781fdf9fad437900275a (diff)
downloadglibc-30c063710e4fa97b4015ef6d7b01adef0dcd8730.tar.gz
glibc-30c063710e4fa97b4015ef6d7b01adef0dcd8730.tar.xz
glibc-30c063710e4fa97b4015ef6d7b01adef0dcd8730.zip
* stdlib/Makefile (tests): Add tst-unsetenv1.
	* stdlib/tst-unsetenv1.c: New file.
-rw-r--r--ChangeLog2
-rw-r--r--stdlib/Makefile2
-rw-r--r--stdlib/tst-unsetenv1.c12
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c593a1267..153f5527bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
 	* stdlib/setenv.c (unsetenv): Don't search environment if it does
 	not exist.
+	* stdlib/Makefile (tests): Add tst-unsetenv1.
+	* stdlib/tst-unsetenv1.c: New file.
 
 2008-11-29  Ulrich Drepper  <drepper@redhat.com>
 
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 1fe7f70177..a69bdaeb73 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -69,7 +69,7 @@ tests		:= tst-strtol tst-strtod testmb testrand testsort testdiv   \
 		   test-a64l tst-qsort tst-system testmb2 bug-strtod2	    \
 		   tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \
 		   tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2	    \
-		   tst-makecontext2 tst-strtod6
+		   tst-makecontext2 tst-strtod6 tst-unsetenv1
 
 include ../Makeconfig
 
diff --git a/stdlib/tst-unsetenv1.c b/stdlib/tst-unsetenv1.c
new file mode 100644
index 0000000000..a2a760d241
--- /dev/null
+++ b/stdlib/tst-unsetenv1.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+
+static int
+do_test (void)
+{
+  clearenv ();
+  unsetenv ("FOO");
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"