Mercurial > hg > octave-lyh > gnulib-hg
changeset 16355:cc8e7dd6c439
spawn-pipe tests: Fix a NULL program name in a diagnostic.
* tests/test-spawn-pipe-main.c: Include progname.h.
(main): Invoke set_program_name.
* modules/spawn-pipe-tests (Depends-on): Add progname.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 04 Feb 2012 18:20:11 +0100 |
parents | 88ce25e2dffc |
children | 2fa8e82affcc |
files | ChangeLog modules/spawn-pipe-tests tests/test-spawn-pipe-main.c |
diffstat | 3 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-02-04 Bruno Haible <bruno@clisp.org> + spawn-pipe tests: Fix a NULL program name in a diagnostic. + * tests/test-spawn-pipe-main.c: Include progname.h. + (main): Invoke set_program_name. + * modules/spawn-pipe-tests (Depends-on): Add progname. + nonblocking-socket tests: Fix a NULL program name in a diagnostic. * tests/test-nonblocking-socket-main.c: Include progname.h. (main): Invoke set_program_name.
--- a/modules/spawn-pipe-tests +++ b/modules/spawn-pipe-tests @@ -6,6 +6,7 @@ Depends-on: close +progname configure.ac:
--- a/tests/test-spawn-pipe-main.c +++ b/tests/test-spawn-pipe-main.c @@ -19,6 +19,7 @@ #include "spawn-pipe.h" #include "wait-process.h" +#include "progname.h" #include <stdbool.h> #include <stdio.h> @@ -80,6 +81,8 @@ int test; int fd; + set_program_name (argv[0]); + if (argc != 3) { fprintf (stderr, "%s: need 2 arguments\n", argv[0]);