summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-userspec.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-09-30 18:22:48 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-09-30 18:22:48 +0400
commitc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (patch)
tree377f4d4e3f0a6471a5012126078fcd97f4c67242 /gnulib-tests/test-userspec.c
parent974ab3dd887985e3aa347f3c6521f819296396a0 (diff)
downloadcoreutils-c18578632fd3c9e513e613a86ba2b7c4ebee6c45.tar.gz
Imported Upstream version 8.23upstream/8.23
Diffstat (limited to 'gnulib-tests/test-userspec.c')
-rw-r--r--gnulib-tests/test-userspec.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnulib-tests/test-userspec.c b/gnulib-tests/test-userspec.c
index 5b026648..437049c4 100644
--- a/gnulib-tests/test-userspec.c
+++ b/gnulib-tests/test-userspec.c
@@ -1,5 +1,5 @@
/* Test userspec.c
- Copyright (C) 2009-2013 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;
}