]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* stdlib/Makefile (tests): Add tst-unsetenv1.
authorUlrich Drepper <drepper@redhat.com>
Tue, 2 Dec 2008 02:27:43 +0000 (02:27 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 2 Dec 2008 02:27:43 +0000 (02:27 +0000)
* stdlib/tst-unsetenv1.c: New file.

ChangeLog
stdlib/Makefile
stdlib/tst-unsetenv1.c [new file with mode: 0644]

index 8c593a1267485b72b7d04b5acd832c73d75dfe23..153f5527bde6654e4b24be724f9e408fbc2a4e13 100644 (file)
--- 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>
 
index 1fe7f701778b8b7f490fa82be1e400d3150f1690..a69bdaeb73c053fc27b2803a994f5f6dbf7d984f 100644 (file)
@@ -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 (file)
index 0000000..a2a760d
--- /dev/null
@@ -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"