X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-userspec.c;h=437049c473baefa0b40a22b10c9e79196fae0854;hb=46f5f314f34a08c9305758482d7d2fdb0e999d09;hp=dd8c41e218e25192d489087554e7ba73c0b288b2;hpb=80a029602f5b2707ca8d2487843ecb9e0df74a6a;p=gnulib.git diff --git a/tests/test-userspec.c b/tests/test-userspec.c index dd8c41e21..437049c47 100644 --- a/tests/test-userspec.c +++ b/tests/test-userspec.c @@ -1,5 +1,5 @@ /* Test userspec.c - Copyright (C) 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2009-2014 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 @@ -181,6 +181,17 @@ main (void) } } + /* Ensure NULL parameters are ignored. */ + { + uid_t uid = (uid_t) -1; + char const *diag = parse_user_spec ("", &uid, NULL, NULL, NULL); + if (diag) + { + printf ("unexpected error: %s\n", diag); + fail = 1; + } + } + return fail; }