changeset 11052:cfcd4fa98c01

Use module 'progname' in some more tests.
author Bruno Haible <bruno@clisp.org>
date Tue, 20 Jan 2009 00:14:31 +0100
parents 958d56849caf
children 90ea94356c75
files ChangeLog modules/uniname/uniname-tests modules/unistdio/u16-vsnprintf-tests modules/unistdio/u16-vsprintf-tests modules/unistdio/u32-vsnprintf-tests modules/unistdio/u32-vsprintf-tests modules/unistdio/u8-vsnprintf-tests modules/unistdio/u8-vsprintf-tests modules/unistdio/ulc-vsnprintf-tests modules/unistdio/ulc-vsprintf-tests tests/uniname/test-uninames.c tests/unistdio/test-u16-vsnprintf1.c tests/unistdio/test-u16-vsprintf1.c tests/unistdio/test-u32-vsnprintf1.c tests/unistdio/test-u32-vsprintf1.c tests/unistdio/test-u8-vsnprintf1.c tests/unistdio/test-u8-vsprintf1.c tests/unistdio/test-ulc-vsnprintf1.c tests/unistdio/test-ulc-vsprintf1.c
diffstat 19 files changed, 91 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,41 @@
+2009-01-19  Bruno Haible  <bruno@clisp.org>
+
+	* modules/uniname/uniname-tests (Depends-on): Add progname.
+	* tests/uniname/test-uninames.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/u8-vsprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-u8-vsprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/u8-vsnprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-u8-vsnprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/u16-vsprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-u16-vsprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/u16-vsnprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-u16-vsnprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/u32-vsprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-u32-vsprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/u32-vsnprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-u32-vsnprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/ulc-vsprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-ulc-vsprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
+	* modules/unistdio/ulc-vsnprintf-tests (Depends-on): Add progname.
+	* tests/unistdio/test-ulc-vsnprintf1.c: Include progname.h.
+	(main): Call set_program_name.
+
 2009-01-19  Eric Blake  <ebb9@byu.net>
 
 	test-unistd: test previous patch
--- a/modules/uniname/uniname-tests
+++ b/modules/uniname/uniname-tests
@@ -5,6 +5,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/u16-vsnprintf-tests
+++ b/modules/unistdio/u16-vsnprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/u16-vsprintf-tests
+++ b/modules/unistdio/u16-vsprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/u32-vsnprintf-tests
+++ b/modules/unistdio/u32-vsnprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/u32-vsprintf-tests
+++ b/modules/unistdio/u32-vsprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/u8-vsnprintf-tests
+++ b/modules/unistdio/u8-vsnprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/u8-vsprintf-tests
+++ b/modules/unistdio/u8-vsprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/ulc-vsnprintf-tests
+++ b/modules/unistdio/ulc-vsnprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/modules/unistdio/ulc-vsprintf-tests
+++ b/modules/unistdio/ulc-vsprintf-tests
@@ -4,6 +4,7 @@
 
 Depends-on:
 xalloc
+progname
 
 configure.ac:
 
--- a/tests/uniname/test-uninames.c
+++ b/tests/uniname/test-uninames.c
@@ -1,5 +1,5 @@
 /* Test the Unicode character name functions.
-   Copyright (C) 2000-2003, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2005, 2007, 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
@@ -22,6 +22,7 @@
 
 #include "xalloc.h"
 #include "uniname.h"
+#include "progname.h"
 
 /* The names according to the UnicodeData.txt file, modified to contain the
    Hangul syllable names, as described in the Unicode 3.0 book.  */
@@ -249,6 +250,8 @@
 {
   int error = 0;
 
+  set_program_name (argv[0]);
+
   fill_names (argv[1]);
 
   error |= test_name_lookup ();
--- a/tests/unistdio/test-u16-vsnprintf1.c
+++ b/tests/unistdio/test-u16-vsnprintf1.c
@@ -1,5 +1,5 @@
 /* Test of u16_vsnprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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
@@ -30,6 +30,7 @@
 
 #include "unistr.h"
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -75,6 +76,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsnprintf ();
+
   return 0;
 }
--- a/tests/unistdio/test-u16-vsprintf1.c
+++ b/tests/unistdio/test-u16-vsprintf1.c
@@ -1,5 +1,5 @@
 /* Test of u16_vsprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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
@@ -30,6 +30,7 @@
 
 #include "unistr.h"
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -75,6 +76,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsprintf ();
+
   return 0;
 }
--- a/tests/unistdio/test-u32-vsnprintf1.c
+++ b/tests/unistdio/test-u32-vsnprintf1.c
@@ -1,5 +1,5 @@
 /* Test of u32_vsnprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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
@@ -30,6 +30,7 @@
 
 #include "unistr.h"
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -75,6 +76,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsnprintf ();
+
   return 0;
 }
--- a/tests/unistdio/test-u32-vsprintf1.c
+++ b/tests/unistdio/test-u32-vsprintf1.c
@@ -1,5 +1,5 @@
 /* Test of u32_vsprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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
@@ -30,6 +30,7 @@
 
 #include "unistr.h"
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -75,6 +76,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsprintf ();
+
   return 0;
 }
--- a/tests/unistdio/test-u8-vsnprintf1.c
+++ b/tests/unistdio/test-u8-vsnprintf1.c
@@ -1,5 +1,5 @@
 /* Test of u8_vsnprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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
@@ -30,6 +30,7 @@
 
 #include "unistr.h"
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -75,6 +76,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsnprintf ();
+
   return 0;
 }
--- a/tests/unistdio/test-u8-vsprintf1.c
+++ b/tests/unistdio/test-u8-vsprintf1.c
@@ -1,5 +1,5 @@
 /* Test of u8_vsprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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
@@ -30,6 +30,7 @@
 
 #include "unistr.h"
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -75,6 +76,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsprintf ();
+
   return 0;
 }
--- a/tests/unistdio/test-ulc-vsnprintf1.c
+++ b/tests/unistdio/test-ulc-vsnprintf1.c
@@ -1,5 +1,5 @@
 /* Test of ulc_vsnprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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,7 @@
 #include <string.h>
 
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -68,6 +69,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsnprintf ();
+
   return 0;
 }
--- a/tests/unistdio/test-ulc-vsprintf1.c
+++ b/tests/unistdio/test-ulc-vsprintf1.c
@@ -1,5 +1,5 @@
 /* Test of ulc_vsprintf() function.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-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,7 @@
 #include <string.h>
 
 #include "xalloc.h"
+#include "progname.h"
 
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
 #define ASSERT(expr) \
@@ -68,6 +69,9 @@
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
+
   test_vsprintf ();
+
   return 0;
 }