Use module progname correctly in the tests that need it.
authorBruno Haible <bruno@clisp.org>
Sun, 18 Jan 2009 17:35:25 +0000 (18:35 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 18 Jan 2009 17:35:25 +0000 (18:35 +0100)
ChangeLog
tests/test-avltree_list.c
tests/test-avltree_oset.c
tests/test-obstack-printf.c
tests/test-quotearg.c
tests/test-xmemdup0.c

index d9b6b253d9f7e1e1d2a9fc58d47cf012fe3fac89..929dcfc595d0ad8833a8a7e0c252caf3cd3f2cf6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-01-18  Bruno Haible  <bruno@clisp.org>
+
+       * tests/test-avltree_list.c (main): Call set_program_name.
+       * tests/test-avltree_oset.c (main): Likewise.
+       * tests/test-obstack-printf.c: Include progname.h.
+       (main): Call set_program_name.
+       * tests/test-quotearg.c: Include progname.h.
+       (main): Call set_program_name.
+       * tests/test-xmemdup0.c: Include progname.h.
+       (main): Call set_program_name.
+
 2009-01-18  Bruno Haible  <bruno@clisp.org>
 
        New module 'alphasort'.
index 59e5d996063b38c240cf8627b67405942611457f..28b97a0e59be647e838077dff6bd991ffa7b3624 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of sequential list data type implementation.
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -74,6 +74,8 @@ main (int argc, char *argv[])
 {
   gl_list_t list1, list2, list3;
 
+  set_program_name (argv[0]);
+
   /* Allow the user to provide a non-default random seed on the command line.  */
   if (argc > 1)
     srand (atoi (argv[1]));
index 7af78e0214e1d33a80b082b78c10a32da2bd74df..3bdf0aa98716aaa63570c5d3527f7b62e2db0560 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of ordered set data type implementation.
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -84,6 +84,8 @@ main (int argc, char *argv[])
 {
   gl_oset_t set1, set2;
 
+  set_program_name (argv[0]);
+
   /* Allow the user to provide a non-default random seed on the command line.  */
   if (argc > 1)
     srand (atoi (argv[1]));
index 9c2761a319e49abef9c3ccbbc0dafecab0685c60..0c918d012d959d31ff1d1bf5f0e5a4d882bf09bc 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of obstack_printf() and obstack_vprintf() functions.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "progname.h"
+
 #define ASSERT(expr) \
   do                                                                        \
     {                                                                       \
@@ -134,6 +136,8 @@ test_obstack_printf ()
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_obstack_vprintf ();
   test_obstack_printf ();
   return 0;
index 04de223cd802201b7d70665ce4ffaa9ac8c01110..f6290600140b2241d64125797ee137d47bf9efa1 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of quotearg family of functions.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -28,6 +28,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "progname.h"
+
 #if ENABLE_NLS
 /* On Linux, gettext is optionally defined as a forwarding macro,
    which would cause syntax errors in our definition below.  But on
@@ -284,10 +286,12 @@ dcgettext (char const *d, char const *str, int c)
 #endif /* ENABLE_NLS */
 
 int
-main ()
+main (int argc, char *argv[])
 {
   int i;
 
+  set_program_name (argv[0]);
+
   /* This program is hard-wired to the C locale since it does not call
      setlocale.  */
   ASSERT (!isprint ('\033'));
index 7295cc0710b5fe4586365927faab3d9b08fafce8..efefd94a261f69ec49d09c23f4e103e8ea10e8cd 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of xmemdup0() function.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,6 +25,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "progname.h"
+
 #define ASSERT(expr) \
   do                                                                        \
     {                                                                       \
@@ -43,6 +45,8 @@ main (int argc, char **argv)
   char buffer[10] = { 'a', 'b', 'c', 'd', '\0',
                      'f', 'g', 'h', 'i', 'j'   };
 
+  set_program_name (argv[0]);
+
   /* Empty string.  */
   {
     char *result = xmemdup0 (NULL, 0);